本地的git仓库,去git push报错:
crifan@licrifandeMacBook-Pro ~/dev/dev_root/crifan/crifan_play_learn_logic_spirit master 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: 无法访问 'https://github.com/crifan/crifan_play_learn_logic_spirit.git/':The requested URL returned error: 403
![](https://www.crifan.org/files/pic/uploads/2021/09/ac546f8927d94ba9bef332335b1f8c27.jpg)
对此:
之前是知道的。GitHub,之前是:
将要在:2021-08-13
现在是:已经过期了
放弃密码支持
改为PAT=personal access token
自己也去创建过了PAT了
但是呢:
此处git仓库是之前clone下载的
此处:希望搞清楚如何:
删除之前记住的?本地的密码?
改为:PAT去访问,去push
remote Support for password authentication was removed on August 13 2021
For MAC OS ⤴
Click on the Spotlight icon (magnifying glass) on the right side of the menu bar. Type Keychain access then press the Enter key to launch the app => In Keychain Access, search for github.com => Find the internet password entry for github.com => Edit or delete the entry accordingly => You are done
看来是:KeyChain保存了之前的密码?
去找找看
![](https://www.crifan.org/files/pic/uploads/2021/09/82ee14551ecb46b7a1b4d75829c048a7.jpg)
![](https://www.crifan.org/files/pic/uploads/2021/09/ba0b9e0fae774464857deaff73c43a9d.jpg)
搜:
github
是有一些的:
![](https://www.crifan.org/files/pic/uploads/2021/09/0ac2b3925283479f9c23e5572f3b2cb0.jpg)
但是:
看起来,像是证书?
或者是github.com网站?
如何找git的密码呢?
Find the internet password entry for github.com
哪个是internet password?
不过,看起来:
4个证书都过期了。
1个是2018年的
3个是2020年的
这里都是2021年了。
所以:都是删除掉,再说
![](https://www.crifan.org/files/pic/uploads/2021/09/045c32b7079241529fb1857024025eb5.jpg)
![](https://www.crifan.org/files/pic/uploads/2021/09/6606e8d8d8a54e03b9e1ee0c9f95840a.jpg)
挨个都删除掉。
![](https://www.crifan.org/files/pic/uploads/2021/09/125af2ca42784523bc3312e9b78983c5.jpg)
突然明白了:
www.github.com 估计是网站登录密码。
至少不是此处的github.com中的仓库的密码。不管,删都删了。
再去试试
问题依旧。
重启VSCode中的终端
问题依旧。
去试试:
git config --global --unset credential.helper git config --system --unset credential.helper
log
✘ crifan@licrifandeMacBook-Pro ~/dev/dev_root/crifan/crifan_play_learn_logic_spirit master git config --global --unset credential.helper ✘ crifan@licrifandeMacBook-Pro ~/dev/dev_root/crifan/crifan_play_learn_logic_spirit master git config --system --unset credential.helper
结果:
![](https://www.crifan.org/files/pic/uploads/2021/09/ccc99b498a63414abdda2a29b5c3fc5f.jpg)
可以了。
点击Allow
跳转到页面去授权:
![](https://www.crifan.org/files/pic/uploads/2021/09/687da7bdb32a44aea1c399a41991ecde.jpg)
继续。
Authorize Visual Studio Code to access GitHub If you initiated this authorization from Visual Studio Code, click 'Continue' to authorize access to GitHub Do not authorize
![](https://www.crifan.org/files/pic/uploads/2021/09/80144642f606499b88df2fd8275a0778.jpg)
https://vscode-auth.github.com 想要打开此应用程序。
![](https://www.crifan.org/files/pic/uploads/2021/09/ed2d6cb48cc047a08920af286d531ecb.jpg)
![](https://www.crifan.org/files/pic/uploads/2021/09/efb4064c688e4389af81eda0191002b6.jpg)
可以继续了:
![](https://www.crifan.org/files/pic/uploads/2021/09/59c200cb016d43768d423657c3cbb06b.jpg)
完成了:
crifan@licrifandeMacBook-Pro ~/dev/dev_root/crifan/crifan_play_learn_logic_spirit master git push枚举对象: 9, 完成. 对象计数中: 100% (9/9), 完成. 使用 4 个线程进行压缩 压缩对象中: 100% (5/5), 完成. 写入对象中: 100% (5/5), 10.60 MiB | 21.85 MiB/s, 完成. 总共 5(差异 2),复用 0(差异 0),包复用 0 remote: Resolving deltas: 100% (2/2), completed with 2 local objects. To https://github.com/crifan/crifan_play_learn_logic_spirit.git 186dcf4..cf0a891 master -> master
![](https://www.crifan.org/files/pic/uploads/2021/09/8c8c9383cfc6465eb1dff6a1e19455f3.jpg)
【总结】
此处,VSCode的终端中,对于 github.com中的某仓库,去
git push
但报错:
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
原因:
github.com中的仓库,之前支持密码登录(去git push等操作)
现在,20210813,之后放弃支持密码,改为 PAT=personal access token=私有访问令牌或 ssh的key。
背景:此处之前已经设置过github.com的PAT。且记得好像是本地其他仓库用过。
解决办法:把此github.com的git仓库,从密码验证改为PAT验证。
具体步骤:删除之前记住的保存的密码,重试,即可触发验证,再输入PAT即可。
删除之前保存的密码:
git config --global --unset credential.helper git config --system --unset credential.helper
重新:
git push
此处特殊,没有弹框让输入PAT。
而是,VSCode的插件:Github
弹框让授权
通过浏览器打开授权页面
然后跳转回来,即可继续正常push了。
转载请注明:在路上 » 【已解决】github的git仓库提交报错:remote Support for password authentication was removed on August 13 2021