Git failed with a fatal error. Authentication failed for
Working with Visual Studio 2017 Enterprise and git as source control.
I recently encountered an issue whilst trying to push local commits to a remote repository. The error message was:
Error encountered while pushing branch to the remote repository: Git failed with a fatal error. Authentication failed for...
The solution is as follows:
- Open Control Panel in Windows
- Click on User Accounts
- Click on Manage your Credentials
- Click on Windows Credentials
- In the list titled Generic Credentials, locate the entry for your remote git repository
- Click the item in the list and then Edit
- Set the Username and Password to the correct credentials
This should now allow you to successfully authenticate with the remote repository