GitHub push代码发生错误:fatal: Authentication failed for ‘ …
使用的https提交,在用SourceTree提交代码时候发生错误,返回的错误提示说:
fatal: Authentication failed for 'https://github.com/ ...
一、解决方案,重新执行git config命令配置用户名和邮箱即可:
git config -–global user.name "xxx"
git config –-global user.email "xxx@xxx.com"
二、解决二
遇到问题:push的时候出现fatal: Authentication failed for ‘
我第一反应是去看我的配置,我检查了我的账户配置,重新设置了git config –global “xxx”和git config –global user.email “xxx”,并git remote add origin
在国内很多网站看了下都不行,就去stackoverflow上一看。原来是我设置了双因子身份认证Two-Factor Athentication。虽然我都不知道什么时候设置的。 解决办法:
git remote -v
git remote remove origin
git remote add origin 仓库地址
最终解决方案
控制面板 凭据管理器
删除登录记录后,会重新输入账号密码 完美解决!