项目场景:

新建了个项目,初次提交到远程仓库的时候,要求输入远程git账号的用户名,密码,输入多次都失败,提示鉴权失败,remote: Invalid username or password.


问题描述:

xxxxxxx@gxxxxx-Pro xxxxx % git push origin master
Username for 'https://github.com': xxxxx@xx.com
Password for 'https://xxxxxxx.xx@github.com': 
remote: Invalid username or password.
fatal: 'https://github.com/xxxxx/xxxx.git/' 鉴权失败

原因分析:

提示账号密码错误,第一反应是到git网站上确认账号密码,反复确认,账号密码无误,查找资料发现,密码并不是你的账户密码,是你的用户token,服了。


解决方案:

解决方案,是在git上面创建token用作密码,输入。创建token流程入下:

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐