Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
548 views
in Technique[技术] by (71.8m points)

windows - Git: Failed to erase credential: Element not found

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:

  • Create local repository ($git init)
  • Connect with remote repository ($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\_Gitmyproject>git clone https://...

Cloning into 'myproject'...

Username for 'https://...': myuser

Password for 'https://myuser[at]...':

fatal: Authentication failed for 'https://...'

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...