解決git push 中remote: Permission to xxxxx.git denied to xxx. fatal: unable to access 'https://github.com/ xxxxx.git/':URL .......


問題:

使用git push -u origin master 命令時 出現 :

remote: Permission to xxxxx.git denied to xxx.

fatal: unable to access 'https://github.com/ xxxxx.git/':URL .......

 

 

解決:

1. 已經 git init 初始化,文件夾中會有.git文件,如果已經git init 沒有看到 .git 文件,

點 查看 勾選 隱藏的項目:

打開.git文件中的config文件,編輯 .git/config中的url:

將config中的url中的

[remote "origin"]
url = https://github.com/git的用戶名/項目名稱
的url改為
url = https://git的用戶名@github.com/git的用戶名/項目名稱
 

改為:

2. 改完之后:git push -u origin master


免責聲明!

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



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