Github错误:fatal: Authentication failed for 'https://github.com/ ...

GitHub push代码发生错误:fatal: Authentication failed for ‘https://github.com/

使用的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"  

转载:http://blog.csdn.net/zhangphil/article/details/47981757