更換電腦後更改了git的用戶名和密碼,導致git的操作失敗,記錄一下修改過程,報錯類型
1、remote: Incorrect username or password ( access token )
fatal: Authentication failed for 'https://gitee.com/***/***.git/'
錯誤原因:用戶名和密碼錯誤,鏈接不上gitee
修改方法:git config --system --unset credential.helper
2、執行git config --system --unset credential.helper的方法時報錯
could not lock config file /etc/gitconfig: Permission denied
錯誤原因:etc 權限不夠
當然要去修改系統目錄etc的權限了,修改系統文件權限的方法
Mac電腦 -- 前往--前往文件夾(路徑:/private/etc)進入etc文件--點擊文件夾選擇顯示簡介--點擊共享與權限 就可以修改了,改爲讀寫
3、git config --system --unset credential.helper
修改成功
本人的問題是:設置的sorecetree中gitee的用戶名和主機gitee.com 的用戶名不一致
修改方法:sorecetree--偏好設置--高級--選擇主機名稱編輯對應的用戶名