AdSense

網頁

2021/7/14

Windows 10 重置GitLab帳號密碼

Windows 10重置GitLab的密碼的方式如下。


在Windows 10用Git Bash第一次clone GitLab的專案會彈出帳號密碼。若不小心輸入錯誤會出現下面訊息。

$ git clone https://gitlab.abc.com/demos/demo.git
Cloning into 'demo'...
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.abc.com/demos/demo.git/'

想重新clone一次卻不會再彈出輸入帳號密碼的視窗,這是因為第一次輸入的帳號密碼已經存在Windows Credentials中,而每次clone都會用這邊的帳密去存取。所以只要把Windows Credentials中GitLab的credential紀錄刪除即可重新輸入。

打開Windows左下角的搜尋,輸入"Credential Manager",或在Control Panel(控制台) > User Accounts(使用者帳戶) > Credential Manager(認證管理員)點選[Windows Credentials(Windows認證)],在下面的[Generic Credentials]找到 git:https://gitlab.abc.com,點選展開並點擊[Remove]即可刪除,這樣下一次重新clone的時候就會重新彈出帳密輸入視窗。


沒有留言:

AdSense