提交代码到github抱歉remote: Invalid username or password. fatal: Authentication failed for

今天git push 到github仓库报错,提示需要输入用户密码,出现如下提示,开始以为是密码记错了,就直接登录github网页是ok的。

remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/xxx/xxx/'

在网上也看了些,发现了原来输入的密码不是登录密码是personal access token。之前创建的personal access token看不到了,重新生成,点击右上角头像,选择Settings->Developer settings->Personal access tokens,单击Generate new token,勾线rep基本上就满足了,单击Generate token,会跳出新页面,记录下new token,重新push或pull,输入new token.基本上就OK.

猜你喜欢

转载自blog.csdn.net/samz5906/article/details/104600119