错误描述:使用Git push一个项目到GitHub上,出现403错误。
fatal: unable to access 'https://github.com/XXX/NanoDiaryAndroid.git/': The requested URL returned error: 403
看了很多帖子,说修改 .git/conf 文件中的地址成这样就行
https://XXX@github.com/XXX/NanoDiaryAndroid.git/
也就是加上自己的GitHub名字。试了也是不行滴。。。
以下方法亲测有效。
修改.git目录下的config文件 URL这一行。
url = https://GitHub名字:GitHub密码@github.com/Daemongy/NanoDiaryAndroid.git
之后再push即可。