1.git push 報錯:RPC failed; HTTP 401 curl 22 The requested URL returned error: 401 The remote end hung up
2.原因:用戶名和密碼輸錯,webstorm會記住git賬號密碼(即使是錯誤的賬號和密碼),導致驗證不通過,沒有權限推送
3.解決:
(1)刪除原始遠程數據源:
git remote rm origin
(2)重新添加遠程數據源,即在http后面,git前面加上用戶名@(shenyf@):
git remote add origin http://shenyf@git.intra.xxx-view.cn:3000/xxx/xxx_xx.git
(3)查看此時遠程數據源,已經添加成功:
git remote -v
(4)此時再執行push操作,會重新提示輸入用戶名和密碼,輸入正確用戶名和密碼即可,若輸錯,仍然不提示,依舊顯示推送失敗