GitHub git push error问题:
Support for password authentication was removed on August 13, 2021
意思是不能再直接使用github的帐号密码作为登录验证。
取而代之的是用Token。
1.GitHub登录后,右上角点击下拉箭头,有个Settings:

2.点击后,选择左侧最下面的Developer settings:

-
点击后,选择Personal access tokens:
WechatIMG4.png
因为token生成只能看一次,下次进来就看不到了。所以请妥善管理。如果忘记了,点击【Generate new token】,记得选择你需要的权限。重新生成。
4.根据自己的token、用户名、仓库名 创建git 命令并使用
git remote set-url origin https://刚刚生成的token@github.com/github的用户名/仓库名称
例子:

终端输入之后即可使用git push了。
或者根据提示push 的时候 输入账户 密码输入我们的token 也可以
网友评论