Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

fatal: Authentication failed without prompt for user name and password #141

Closed
ybro opened this issue Mar 6, 2016 · 21 comments
Closed

fatal: Authentication failed without prompt for user name and password #141

ybro opened this issue Mar 6, 2016 · 21 comments
Assignees
Labels
bug Marks an issue as tracking a bug, or marks a pull request as fixing a bug.
Milestone

Comments

@ybro
Copy link

ybro commented Mar 6, 2016

Hi.
I'm using Git credentials manager with Cmder and our git repo is on msazure.visualstudio.com.
On my desktop it works just fine but on my laptop I get "fatal: Authentication failed for {our repo}".
Deleting the credentials directly in the windows credential manager doesn't work. Neither does adding it. (It never prompts a window with request for user and password)
Also verified this: credential.helper=manager
No luck so far. Restarting my machine didn't help either.

@htuomola
Copy link

htuomola commented Mar 6, 2016

I do get the prompt for credentials (popup window, for VS Team Services) but still get the same "Fatal: authentication failed" message. I think it relates to v1.2.0, I installed 1.1.0 release and authentication errors disappeared. I wasn't even re-prompted for credentials, I guess they were saved to Windows Credential Store.

@ybro
Copy link
Author

ybro commented Mar 7, 2016

Thanks. Uninstalling v1.2.0 and installing v1.1.0 solved the problem.

@ybro
Copy link
Author

ybro commented Mar 7, 2016

Some logs for the developers for v1.2.0:
The logs shifts all the time from Program::Get to Program::Erase over and over.
Here are 2 occurrences:

Log Start (2016-03-06 14:06:50Z)
Microsoft Git Credential Manager for Windows version Git Credential Manager for Windows
Program::Get
targetUri = https://msazure.visualstudio.com/
Program::CreateAuthentication
detecting authority type
authority is Azure Directory
credentials found

Log Start (2016-03-06 14:06:55Z)
Microsoft Git Credential Manager for Windows version Git Credential Manager for Windows
Program::Erase
targetUri = https://msazure.visualstudio.com/
Program::CreateAuthentication
detecting authority type
authority is Azure Directory
deleting VSTS credentials

Log Start (2016-03-06 14:08:28Z)
Microsoft Git Credential Manager for Windows version Git Credential Manager for Windows
Program::Get
targetUri = https://msazure.visualstudio.com/
Program::CreateAuthentication
detecting authority type
authority is Azure Directory
credentials found

Log Start (2016-03-06 14:08:33Z)
Microsoft Git Credential Manager for Windows version Git Credential Manager for Windows
Program::Erase
targetUri = https://msazure.visualstudio.com/
Program::CreateAuthentication
detecting authority type
authority is Azure Directory
deleting VSTS credentials

@jeffa00
Copy link

jeffa00 commented Mar 7, 2016

I am having the same experience.

I can work fine in VS, but get the error at the command line. This is new behavior. Not sure what has changed.

UPDATE**

I uninstalled 1.2, then reinstalled it and had the same error.

Next I uninstalled 1.2 and installed 1.1 and all it worked immediately.

@whoisj
Copy link
Contributor

whoisj commented Mar 8, 2016

Uninstalling v1.2.0 and installing v1.1.0 solved the problem.

Next I uninstalled 1.2 and installed 1.1 and all it worked immediately.

Thanks for that, we now know it is a bug in 1.2. I'll mark this accordingly.

The get -> delete cycle is usually triggered by Git instructing the GCM to delete credentials because the supplied credentials were reported as invalid by the host. Unfortunately, I'm not seeing this happen with any of the instances of VSTS I have. I'll keep trying and with luck can reproduce the issue and resolve it quickly.

@whoisj whoisj added the bug Marks an issue as tracking a bug, or marks a pull request as fixing a bug. label Mar 8, 2016
@whoisj whoisj self-assigned this Mar 8, 2016
@whoisj
Copy link
Contributor

whoisj commented Mar 8, 2016

Thanks to @ybro I was able to resolve this issue quickly. #142

@whoisj whoisj closed this as completed Mar 8, 2016
@whoisj whoisj added this to the v1.2.1 milestone Mar 8, 2016
@thattolleyguy
Copy link

@whoisj I just installed 1.2.1 and I'm still having the same issue. Is there a way to clear the stored credentials or something else I need to do?

@whoisj
Copy link
Contributor

whoisj commented Mar 21, 2016

Is there a way to clear the stored credentials or something else I need to do?

Try the following:

  1. Click Start
  2. Type: Credential Manager
  3. See the Windows Credential 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 removed, 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 Remove and confirm removal when prompted.

Wash, rinse, repeat as necessary.

@thattolleyguy
Copy link

That worked and taught me something new. Thanks!

@whoisj
Copy link
Contributor

whoisj commented Mar 22, 2016

That worked and taught me something new. Thanks!

🎈

You're welcome. 😀

@carlin-q-scott
Copy link

I had this issue this week... Why hasn't it been fixed? I basically followed whoisj's workaround except I actually updated the password right there instead of removing the entry in Credential Manager.

@kwazel
Copy link

kwazel commented Apr 5, 2017

I had this problem today as well (git version 2.12.2.windows.1). I think it depends on your configuration whether you suffer from it, but somebody may have to report a new bug for this.

@whoisj
Copy link
Contributor

whoisj commented Apr 5, 2017

@carlin-q-scott @kwazel the issue should be fixed in the latest Git for Windows (v2.12.2.windows.2)

@carlin-q-scott
Copy link

@whoisj Ah, I was using an older version, the one that comes with Git-Extensions. I've updated to the latest version so hopefully I never have this issue again.

@rimpey
Copy link

rimpey commented May 29, 2018

Thank you whoisj that really helped me resolve my git issue.. years later your reply lives on :)

@sw-enthusiast
Copy link

Thank you @gistofj

@y-code
Copy link

y-code commented Sep 1, 2019

I came across the same issue in macOS. The steps to clean up stored credentials in macOS are:

  1. launch Keychain Access app
  2. select login in Keychains
  3. select Passwords in Category
  4. search by appharbor from the search box on the top right corner
  5. delete the found credentials from its context menu

@dscho
Copy link
Member

dscho commented Sep 2, 2019

@y-code are you sure that you are using the Git Credential Manager for Windows on macOS?

@y-code
Copy link

y-code commented Sep 7, 2019

@dscho oh, sorry. I didn' t notice this repo is for Windows. it was not appropriate to talk about the case on macOS.

@generated
Copy link

i'm still facing the same issue on 2.26.1.windows.1.
git pull throws fatal: Authentication failed for 'http://..'
git config --local credential.helper shows manager and in the windows credential manager i've removed every entry.

@kwazel
Copy link

kwazel commented Apr 20, 2020

i'm still facing the same issue on 2.26.1.windows.1.
git pull throws fatal: Authentication failed for 'http://..'
git config --local credential.helper shows manager and in the windows credential manager i've removed every entry.

Did you try setting http(s)://username@url instead of http(s)://url?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Marks an issue as tracking a bug, or marks a pull request as fixing a bug.
Projects
None yet
Development

No branches or pull requests