Git Push項目到GitHub403錯誤

錯誤描述:使用Git push一個項目到GitHub上,出現403錯誤。

fatal: unable to access 'https://github.com/XXX/NanoDiaryAndroid.git/': The requested URL returned error: 403

看了很多帖子,說修改 .git/conf 文件中的地址成這樣就行

https://[email protected]/XXX/NanoDiaryAndroid.git/

也就是加上自己的GitHub名字。試了也是不行滴。。。

以下方法親測有效。

修改.git目錄下的config文件 URL這一行。

url = https://GitHub名字:GitHub密碼@github.com/Daemongy/NanoDiaryAndroid.git

之後再push即可。

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章