error: RPC failed; HTTP 401 curl 22 The requested URL returned error: 401
error: RPC failed; HTTP 401 curl 22 The requested URL returned error: 401
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date
同事提交代碼時發生這個錯誤。
導致這個發生的原因是:修改了git賬號的密碼(或者是第一次讓輸入密碼的時候沒有輸入正確)
當我們輸入密碼之后,無論對與錯,git都會把密碼保存在windows的緩存中。
解決方案(windows):
控制面板 --> 用戶賬戶 --> 管理Windows憑據
使用命令
網上查到的大多數是讓輸入命令:git config --global credential.helper store
但是這個只是設置 會存儲 賬號密碼,我自己這里並沒有讓重新輸入賬號密碼,可能還是因為Windows存儲了。