git push 403的解決方法


創建一個GitHub.com項目,Push時總是提示403錯誤:

[amonest@localhost ~]$ git config --global user.name amonest
[amonest@localhost ~]$ git config --global user.email xxx@xxx.com

[amonest@localhost ~]$ git clone https://github.com/amonest/python-scripts.git
[amonest@localhost ~]$ cd python-scripts

... 省略中間代碼修改過程 ...

[amonest@localhost python-scripts]$ git remote add orginal https://github.com/amonest/python-scripts.git
[amonest@localhost python-scripts]$ git push orginal master
error: The requested URL returned error: 403 while accessing https://github.com/amonest/python-scripts.git/info/refs

fatal: HTTP request failed

 

網上搜索了半天,終於找到解決方法:《Pushing to Git returning Error Code 403 fatal: HTTP request failed

[amonest@localhost python-scripts]$ git remote set-url orginal https://amonest@github.com/amonest/python-scripts.git
[amonest@localhost python-scripts]$ git push orginal master

稍等一下就會提示輸入密碼:

 

這樣就OK了。

 

與Git有關的一些文檔:


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM