Monday, March 2, 2020

git authentication failed after changing password or installing a new version of git for Windows

After installing a new version of git for Windows or changing the git repository password, the following git error messages may appear when trying to access the git repository: "...access denied...fatal authentication failed for ..."
 
This problem can be resolved by resetting the git password in the Windows Credential Manager.

  1. Click the Windows Start button.
  2. Start typing in "Credential Manager". When the Credential Manager icon is displayed, click the icon.

    The Credential Manager dialog box appears.

  3. Click the Windows Credentials icon.
  4. Scroll down the credential list and look for a git generic credential, e.g. git:https://gitlab.com. Click on the credential.

    The git credential properties appear.

  5. Click Remove.



    The git credential is removed.
  6. Close the Credential Manager.

Now, running any git command to access the repository will cause Windows to pop up a dialog box to enter the login and pasword, as shown below.
Entering the correct login and password will allow the git command to be executed successfully.


No comments: