Git push results in "Authentication Failed" Git push results in "Authentication Failed" git git

Git push results in "Authentication Failed"


If you enabled two-factor authentication in your Github account you won't be able to push via HTTPS using your accounts password. Instead you need to generate a personal access token. This can be done in the application settings of your Github account. Using this token as your password should allow you to push to your remote repository via HTTPS. Use your username as usual.

https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/

You may also need to update the origin for your repository if set to https:

git remote -v git remote remove origin git remote add origin git@github.com:user/repo.git  


Try the following steps to Edit or Remove the saved credentials:

  1. Click Start
  2. Type: Credential Manager (On Windows 10, this is under "Start->Settings". Then search for "Credential Manager")
  3. See the Windows Credentials Manager shortcut and double-click it to open the application.
  4. Once the app is open, click on the Windows Credentials tab.
  5. Locate the credentials that you want to remove/update, they will start with "git:" and might begin with "ada:"
  6. Click on the credential entry, it will open a details view of the entry.
  7. Click Edit or Remove as required and confirm.
  8. Wash, rinse, repeat as necessary.

enter image description here


It happens if you change your login or password of git service account (Git). You need to change it in Windows Credentials Manager too. type "Credential Manager" in Windows Search menu open it.

Windows Credentials Manager->Windows Credential and under Generic Credentials edit your git password.