GitHub无法提交 remote: Support for password authentication was removed on August 13, 2021.

问题

今儿提交代码发现终端报错

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/xwLyc/xwLyc.github.io.git/': The requested URL returned error: 403

一开始值关注最后一个403报错,怎么也没解决,后来仔细看了,发现 第一行错误提示。

大体意思是,github从2021年8月13号开始,请使用个人访问令牌代替账号密码验证提交。

真能搞事情= =

解决方案

打开github网站,在个人设置页面找到 Setting -> Developer setting -> Personal access tokens,然后选择 Generate new token,设置token的有效期,访问权限等。

最后点击 Generate token生成令牌。

最后把token直接添加远程仓库链接中:

git remote set-url origin https://<your_token>@github.com/<USERNAME>/<REPO>.git

再次提交代码,就可以啦,亲测有效。

参考文章

也是看这篇文章解决的,介绍的非常详细。

github开发人员在七夕搞事情:remote: Support for password authentication was removed on August 13, 2021.

打赏一个呗

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦