错误信息

1
2
3
4
$ git push -u origin master
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/mashaz/xxx.git
fatal: HTTP request failed

解决方案

修改 .git/config
把 形如 url = https://MichaelDrogalis@github.com/mashaz/xxx.git 修改为url = ssh://git@github.com/mashaz/xxx.git的格式

相关资料

Stack Overflow