git clone 無權限


錯誤提示:

remote: Coding.net Tips : [You have no permission to access this repo.] 
fatal: unable to access ‘https://git.coding.net/xxxxxxxx/xxxx.git/‘: The requested URL returned error: 403

錯誤原因:

git 客戶端緩存了錯誤的密碼,賬號密碼和本地存儲的混淆,不正確;一般是多個git 賬號會導致這樣的情況,如自己的git賬號 和在公司的git 賬號,同時一起用

簡單方法:

clone 時,把賬號和密碼帶上,一起克隆,會把改賬號和密碼也添加到~/.git-credentials

http://yourname:password@git.coding.net/xxxxxxxx/xxxx.git/

其他方法

windows /Users/xxx/.gitconfig 打開 .gitconfig 直接修改文件 
mac 輸入命令行 git config –list 會出來 credential.helper=osxkeychain , 對應的也就是Mac的“鑰匙串”系統,我們可以通過Mac系統菜單頁面“其他->鑰匙串訪問”功能,搜索git關鍵字查看

 

 

用帶着用戶名和密碼的方法來clone注意: 密碼中不可包括@ 或 : 字符

 


免責聲明!

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



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