有一天要把本機變更的 Commit 推送到遠端的 Git 存放庫時,赫然發現居然無法推送,並且告知 "Remote: Http Basic: Access denied. blabla…Authentication failed for XXXXXXXXX" 🤔

不對阿,這也不是第一次推送,怎會突然授權出錯了…
查了一下 Windows 本機(控制台\使用者帳戶\認證管理員)中找到的 "Windows 認證" 紀錄,在 "一般認證" 的紀錄當中還真的沒找到:

但是在命令提示字元當中透過 Git 的指令: "git config --list" 查詢:

這下更啟人疑竇了…
靜下心思考了一下,前一陣子似乎有依照資安要求,針對連線帳號所使用的密碼進行過變更,那遠端 Git 存放庫的帳號密碼是不是也要進行重新驗證?
抱著姑且一試的心態,透過 "Administrator 模式" 執行命令提示字元,並使用下列指令進行處理:
"git config --system --unset credential.helper"

接著也看到 Git Credential Manager 的出現。

再到 Windows 本機(控制台\使用者帳戶\認證管理員)中找到 "Windows 認證" 紀錄,在 "一般認證" 的紀錄當中就出現了所要的認證紀錄:

再次從 VS 重新推送專案的 Commit 到遠端 Git 存放庫:

成功~~~
I'm a Microsoft MVP - Developer Technologies (From 2015 ~).

I focus on the following topics: Xamarin Technology, Azure, Mobile DevOps, and Microsoft EM+S.
If you want to know more about them, welcome to my website:
https://jamestsai.tw
本部落格文章之圖片相關後製處理皆透過 Techsmith 公司 所贊助其授權使用之 "Snagit" 與 "Snagit Editor" 軟體製作。