本地的git仓库,去git push报错:
1 2 3 4 | 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 |

对此:
之前是知道的。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保存了之前的密码?
去找找看


搜:
github
是有一些的:

但是:
看起来,像是证书?
或者是github.com网站?
如何找git的密码呢?
Find the internet password entry for github.com
哪个是internet password?
不过,看起来:
4个证书都过期了。
1个是2018年的
3个是2020年的
这里都是2021年了。
所以:都是删除掉,再说


挨个都删除掉。

突然明白了:
www.github.com 估计是网站登录密码。
至少不是此处的github.com中的仓库的密码。不管,删都删了。
再去试试
问题依旧。
重启VSCode中的终端
问题依旧。
去试试:
1 2 | git config --global -- unset credential.helper git config --system -- unset credential.helper |
log
1 2 | ✘ 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 |
结果:

可以了。
点击Allow
跳转到页面去授权:

继续。
1 2 3 | 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 |

1 | https: //vscode-auth .github.com 想要打开此应用程序。 |


可以继续了:

完成了:
1 2 3 4 5 6 7 8 9 | 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 |

【总结】
此处,VSCode的终端中,对于 github.com中的某仓库,去
git push
但报错:
1 | 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即可。
删除之前保存的密码:
1 2 | git config --global -- unset credential.helper git config --system -- unset credential.helper |
重新:
1 | git push |
此处特殊,没有弹框让输入PAT。
而是,VSCode的插件:Github
弹框让授权
通过浏览器打开授权页面
然后跳转回来,即可继续正常push了。
转载请注明:在路上 » 【已解决】github的git仓库提交报错:remote Support for password authentication was removed on August 13 2021