windows – git clone: Authentication failed for

windows – git clone: Authentication failed for

I faced same error on my PC. I was trying to clone a repository. My PC was absolutely new with a freshly installed operating system. I was using Git bash as my Git client. When I ran Gits command to clone a repository it was not prompting me for user id and password which will be used for authentication. It was a new PC so no credentials were cached by Windows credential manager.

As a last resort, I manually added my credentials in credentials manager.

Go to > Control Panel > Click User Accounts > Click Credential Manager > Click Windows Credentials

Now, click Add a Windows credential in Windows Credentials section as shown below:


Now, enter the details as shown in the form below and click OK:


I had put the details as below:

Internet or network address: <gitRepoServerNameOrIPAddress>
User Name: <DomainNameMyUserName>
Password: <MyPassword>

Next time when you run any Git command targeting a repository set up on above address, this manually cached credential will be used.


  1. If you have Git bash command line already open then close and reopen it for the credential changes to take effect.
  2. Also remember that when your domain account password changes next time then youll have to update the newly set password on this screen as well.

Go to > Control PanelUser AccountsCredential Manager > Manage Windows Credentials
and remove all generic credentials involving Git. (This way youre resetting all the credentials)

After this, when you clone, youll be newly and securely asked your Git username and password instead of Authentication error. Similar logic can be applied for Mac users using Sourcetree.

Hope it helps.

windows – git clone: Authentication failed for

Adding username and password has worked for me: For e.g.

https://myUserName:[email protected]/myAuthentificationName/myRepository.git

Leave a Reply

Your email address will not be published.