Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT entered wrong password, can't clone anymore

Tags:

git

github

I just wanted to make a clone of a private repositoy from Github, and the prompt showed up and asked for my login details. I made a typo, but I don't get a second try. If I try to clone again I get the following message:

Cloning into 'name'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/owner/name.git/'

I want to set a default password and username for my git, because I will only use 1 Github account. How do I get to set my username and password?

I found many things online, but none that were a clear command to set your credentials.

Thanks in advance

like image 480
BramCoding Avatar asked Nov 08 '18 16:11

BramCoding


People also ask

How do I resolve authentication failed in git clone?

Go to Control Panel\All Control Panel Items\Credential Manager and select Generic Credentials. Remove all the credential with your company domain name. Git clone repository from git bash terminal once again and it will ask for password and username. Insert it again and you are all set!

Why git clone is not working?

Typos happen, and repository names are case-sensitive. If you try to clone [email protected]:user/repo. git , but the repository is really named User/Repo you will receive this error. To avoid this error, when cloning, always copy and paste the clone URL from the repository's page.


1 Answers

Try below solution which works for me:

  1. Go to Windows Credential Manager. This is done in a EN-US Windows by pressing the Windows Key and typing 'credential'. In other localized Windows variants you need to use the localized term (See comments for some examples).

alternatively you can use the shortcut control /name Microsoft.CredentialManager in the run dialog (WIN+R)

  1. Edit the git entry under Windows Credentials, replacing old password with the new one.
like image 147
Amir Espelani Avatar answered Nov 15 '22 02:11

Amir Espelani