I'm trying to set up Git on a fresh machine, and I'm having trouble authenticating with my remote repository.
I have limited experience with Git, but I have successfully done the following before:
$git init
)$git remote add origin https://[my remote repository]
)Everything goes well up until this point. However, when I try to interact with the remote repository - pull, clone or push - either through command line or TortoiseGit, I am greeted with the following error message upon entering my credentials:
Failed to erase credential: Element not found
fatal: Authentication failed for https://[my remote repository]
It obviously seems like some sort of authentication issue - however, I can log into the web interface of the remote repo just fine, so I'm certain I'm using the correct un/pw. I've installed the Windows Credential Store for Git, but that throws the exact same error message.
Google hasn't been much help - this solution seems to be Vista / 32bit specific (I'm Win7 / 64bit), and this SO question has been removed, leaving me none the wiser.
Now, I'm sure there's a simple solution to my problem, but I've been at it all day with no progress. Anybody able to give me a pointer?
Thanks in advance!
Edit: Here's the full results of a clone
command:
I:\KODE\_Git\myproject>git clone https://...
Cloning into 'myproject'...
Username for 'https://...': myuser
Password for 'https://myuser[at]...':
fatal: Authentication failed for 'https://...'
With the default configuration of git on windows, this is stored in Windows under: control panel => User => Credential manager .
To update your credentials, go to Control Panel → Credential Manager → Generic Credentials. Find the credentials related to your Git account and edit them to use the updated password. This should be the accepted answer if git config --list contains credential. helper=wincred .
I had the same error in windows. It happened after i changed the credentials in the Control panel -> Users -> Manage credentials.
I fixed it by adding a new credential:
git:https://github.com (web credentials) and username and password.
I had this problem with github. In my case the source of the problem was Two-factor authentication. I had it turned on, and when I turned it off - I got rid of that credential-error.
That's a shame though that I have to keep Two-factor authentication off because of it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With