赞
踩
环境: 2021年08月15日, git version 2.30.1 (Apple Git-130), macOS Big Sur 11.4
8月13号后, git pull
& git push
均报错
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: unable to access 'https://github.com/HouShiqi/SQIWritings.git/': The requested URL returned error: 403
2021 年 8 月 13 日官方移除了对密码身份验证的支持, 原来通过https
, 账号密码方式访问 github 仓库已经不被支持, 若还想使用https
访问, 需要改用个人访问令牌(用此令牌代替原来的密码)。
删除钥匙串中存储的 github 互联网密码, 这样再次使用git pull
等命令, shell 会提示输入新的账号密码, 而不再使用钥匙串中存储的旧密码.
打开github.com
官网, 点击头像下拉菜单
-> Settings
-> Developer Settings
-> Personal access tokens
-> Generate new token
;
填写如下必要信息, 勾选 token 的权限范围;
点击底部Generate token
按钮生成 token, 代替原来的密码使用即可;
Personal access tokens function like ordinary OAuth access tokens. They can be used instead of a password for Git over HTTPS, or can be used to authenticate to the API over Basic Authentication.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。