今天在visual studio中運行項目,打算pull最新的代碼的時候,報錯:
Git failed with a fatal error. Authentication failed for ‘http://......’
1. 首先你要看一下是不是自己的賬號密碼錯誤,不匹配
git config --global --list
2. 如果賬號密碼正確則嘗試一下這個解決方案:
git config --system --unset credential.helper
3. 有些人可能會出現新的問題:
error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied.
可以通過路徑 Control Panel | User Accounts | Credential Manager 在 Generic Credentials找到對應的權限
Figure: 移出出錯項目的對應用戶憑證
note: 當然也可以通過 Control Panel | All Control Panel Items | Credential Manager 找到對應路徑
接下來再嘗試pull的操作重新輸入賬號密碼,問題就被解決了