您的位置:首页 > 大数据 > 人工智能

遇到问题:push的时候出现fatal: Authentication failed for 'https://git.oschina.net/andthink/zsxw_android.git/'问

2017-09-29 16:09 806 查看
GitHub push代码发生错误:fatal: Authentication failed for 'https://github.com/ ...
使用的https提交,在用SourceTree提交代码时候发生错误,返回的错误提示说:

[plain] view
plain copy

fatal: Authentication failed for 'https://github.com/ ...   

如图所示:



一、解决方案,重新执行git config命令配置用户名和邮箱即可:

[plain] view
plain copy

git config -–global user.name "xxx"   

git config –-global user.email "xxx@xxx.com"   

二、

遇到问题:push的时候出现fatal: Authentication failed for 'https://git.oschina.net/andthink/zsxw_android.git/'问题。

我第一反应是去看我的配置,我检查了我的账户配置,重新设置了git config --global user.name "xxx"和git config --global user.email "xxx",并git remote add origin https://git.oschina.net/xxxx后没有任何改变。
在国内很多网站看了下都不行,就去stackoverflow上一看。原来是我设置了双因子身份认证Two-Factor
Athentication。虽然我都不知道什么时候设置的。

解决办法:
git remote -v
git remote remove origin
git remote add origin 仓库地址
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐