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

Since Windows update to version 19041.1 authentication does not work #879

Open
2 of 9 tasks
totollygeek opened this issue Dec 19, 2019 · 14 comments
Open
2 of 9 tasks

Comments

@totollygeek
Copy link

totollygeek commented Dec 19, 2019

Which Version of GCM are you using ?
Git Credential Manager for Windows version 1.20.0

Which service are you trying to connect to

  • Azure DevOps
  • Azure DevOps Server (TFS/on-prem)
  • GitHub
  • GitHub Enterprise
  • Bitbucket
  • Other? - please describe;

If you're using Azure DevOps, can you access the repository in the browser via the same URL?

  • Yes
  • No, I get a permission error.
  • No, for a different reason:

Expected behavior
When doing git pull, git push or git clone credentials stored in Credentials Manager to be used or if missing, to be prompted to enter them.

Actual behavior
It just yields fatal: Authentication failed for 'MY TFS URL'
It worked just fine before the Windows update on two of my machines. Same outcome afterwards.
Even after clearing ALL the credentials in Windows Credentials Manager still does not ask me for my credentials, but just fails.

Set the env variables GCM_TRACE=1 and GIT_TRACE=1 and run your git command. Redact any private information and attach the log

11:15:59.396386 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
11:15:59.396386 git.c:344 trace: built-in: git clone 'REDACTED'
Cloning into 'REDACTED'...
11:15:59.448320 run-command.c:640 trace: run_command: git remote-https origin 'REDACTED'
11:15:59.463933 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:15:59.463933 git.c:576 trace: exec: git-remote-https origin 'REDACTED'
11:15:59.463933 run-command.c:640 trace: run_command: git-remote-https origin 'REDACTED'
11:15:59.479543 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:16:00.913859 run-command.c:640 trace: run_command: 'git credential-manager get'
11:16:01.083184 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:16:01.083184 git.c:576 trace: exec: git-credential-manager get
11:16:01.083184 run-command.c:640 trace: run_command: git-credential-manager get
11:16:01.167610 ...\Common.cs:744 trace: [Main] git-credential-manager (v1.20.0) 'get'
11:16:01.236642 ...\Git\Where.cs:348 trace: [FindGitInstallations] found 1 Git installation(s).
11:16:01.236642 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 16 entries.
11:16:01.331571 ...\Common.cs:85 trace: [CreateAuthentication] detecting authority type for 'REDACTED'.
11:16:01.336576 ...\Common.cs:224 trace: [CreateAuthentication] authority for 'REDACTED' is basic with NTLM=Auto.
11:16:01.336576 ...\Common.cs:765 trace: [QueryCredentials] querying 'Auto' for credentials.
11:16:01.352212 ...\Common.cs:780 trace: [QueryCredentials] credentials found.
11:16:02.602163 run-command.c:640 trace: run_command: 'git credential-manager erase'
11:16:02.639897 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:16:02.639897 git.c:576 trace: exec: git-credential-manager erase
11:16:02.639897 run-command.c:640 trace: run_command: git-credential-manager erase
11:16:02.732291 ...\Common.cs:744 trace: [Main] git-credential-manager (v1.20.0) 'erase'
11:16:02.793290 ...\Git\Where.cs:348 trace: [FindGitInstallations] found 1 Git installation(s).
11:16:02.808915 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 16 entries.
11:16:02.871378 ...\Common.cs:85 trace: [CreateAuthentication] detecting authority type for 'REDACTED'.
11:16:02.886996 ...\Common.cs:224 trace: [CreateAuthentication] authority for 'REDACTED' is basic with NTLM=Auto.
11:16:02.886996 ...\Common.cs:252 trace: [DeleteCredentials] deleting basic credentials for 'REDACTED'.
11:16:02.886996 ...aseSecureStore.cs:59 trace: [Delete] credentials not found for 'git:REDACTED'.
fatal: Authentication failed for 'REDACTED'

@totollygeek
Copy link
Author

Anybody have any idea on this one? I had to disable the manager and enter my credentials manually every time I interact with the remote...

@PatrickKursawe
Copy link

I had similar symptoms, but I could not access the repository at all from windows, only from the linux subsystem.
Deleting the credentials from the windows credentials manager did not result in a prompt.
Finally, I added the credentials manually: git:https://my.host.name as address, the username without any domain specification and the password. After that, it worked.
Trace log from the last attempt that did not work looked this way:
c:\Users\kursa\source\repos\Chronos>git pull 13:54:13.645220 ...\Common.cs:744 trace: [Main] git-credential-manager (v1.20.0) 'get' 13:54:13.712220 ...\Git\Where.cs:348 trace: [FindGitInstallations] found 1 Git installation(s). 13:54:13.718219 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 26 entries. 13:54:13.772220 ...\Common.cs:85 trace: [CreateAuthentication] detecting authority type for 'https://devops.axelsemrau.de/'. 13:54:13.786219 ...\Common.cs:224 trace: [CreateAuthentication] authority for 'https://devops.axelsemrau.de/' is basic with NTLM=Auto. 13:54:13.787228 ...\Common.cs:765 trace: [QueryCredentials] querying 'Auto' for credentials. 13:54:13.892923 ...uthentication.cs:119 trace: [AcquireCredentials] 'https://devops.axelsemrau.de/' supports NTLM, sending NTLM credentials instead 13:54:13.893878 ...\Common.cs:780 trace: [QueryCredentials] credentials found. 13:54:14.058498 ...\Common.cs:744 trace: [Main] git-credential-manager (v1.20.0) 'erase' 13:54:14.124535 ...\Git\Where.cs:348 trace: [FindGitInstallations] found 1 Git installation(s). 13:54:14.130513 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 26 entries. 13:54:14.171534 ...\Common.cs:85 trace: [CreateAuthentication] detecting authority type for 'https://devops.axelsemrau.de/'. 13:54:14.187534 ...\Common.cs:224 trace: [CreateAuthentication] authority for 'https://devops.axelsemrau.de/' is basic with NTLM=Auto. 13:54:14.190498 ...\Common.cs:252 trace: [DeleteCredentials] deleting basic credentials for 'https://devops.axelsemrau.de/'. 13:54:14.197533 ...aseSecureStore.cs:59 trace: [Delete] credentials not found for 'git:https://devops.axelsemrau.de'. 13:54:14.344087 ...\Common.cs:744 trace: [Main] git-credential-manager (v1.20.0) 'erase' 13:54:14.414122 ...\Git\Where.cs:348 trace: [FindGitInstallations] found 1 Git installation(s). 13:54:14.420092 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 26 entries. 13:54:14.461127 ...\Common.cs:85 trace: [CreateAuthentication] detecting authority type for 'https://devops.axelsemrau.de/'. 13:54:14.478122 ...\Common.cs:224 trace: [CreateAuthentication] authority for 'https://devops.axelsemrau.de/' is basic with NTLM=Auto. 13:54:14.479090 ...\Common.cs:252 trace: [DeleteCredentials] deleting basic credentials for 'https://devops.axelsemrau.de/'. 13:54:14.486123 ...aseSecureStore.cs:59 trace: [Delete] credentials not found for 'git:https://devops.axelsemrau.de'. fatal: Authentication failed for 'https://devops.axelsemrau.de/Chromatographie/Chronos/_git/Chronos/'
It looks like after leaving out the domain part, it did no longer try to use any NTLM related stuff.
Took me "only" a day.

@HughG
Copy link

HughG commented Jan 10, 2020

Anybody have any idea on this one? I had to disable the manager and enter my credentials manually every time I interact with the remote...

This might be a duplicate of one or more of #703, #750, and/or #793, but it's hard to tell because you've REDACTED the repo URL. If your original logs show that the "get" pass has no username in the URL, but your "delete" pass does, that points to it being similar. I have a similar problem and am about to go and add a comment on #703.

I'm on Windows 10 Pro Version 1909 build 18363.535, Git for Windows 2.24.1.windows.2, and GCM v1.20.0.

@totollygeek
Copy link
Author

As it turns out, I am having issues even installing and removing the manager. When I use git credential-manager install/deploy I get this:

❯ git credential-manager install
11:40:45.953228 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
11:40:45.956226 git.c:703               trace: exec: git-credential-manager install
11:40:45.956226 run-command.c:662       trace: run_command: git-credential-manager install
11:40:46.075678 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.20.0) 'install'

Looking for Git installation(s)...
11:40:46.108305 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
  C:\Program Files\Git

Deploying from 'C:\Program Files\Git\mingw64\libexec\git-core' to 'C:\Program Files\Git'.
11:40:46.112371 ...\Installer.cs:817    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\AzureDevOps.Authentication.dll'.
11:40:46.113359 ...\Installer.cs:831    trace: [CleanFiles] clean of 'C:\Program Files\Git\mingw64\libexec\git-core' failed.
11:40:46.116559 ...\Installer.cs:852    trace: [CopyFiles] copy 'AzureDevOps.Authentication.dll' from 'C:\Program Files\Git\mingw64\libexec\git-core' to 'C:\Program Files\Git\mingw64\libexec\git-core'.
11:40:46.119746 ...\Installer.cs:863    trace: [CopyFiles] ! error: 'The process cannot access the file 'C:\Program Files\Git\mingw64\libexec\git-core\AzureDevOps.Authentication.dll' because it is being used by another process.'.
11:40:46.121165 ...\Installer.cs:875    trace: [CopyFiles] copy failed.
11:40:46.122166 ...\Common.cs:709       trace: [LogEvent] Deployment to 'C:\Program Files\Git' failed.
  deployment failed. U_U

Press any key to continue...
11:40:46.127523 ...\Program.cs:328      trace: [Deploy] Installer result = 'DeploymentFailed', exit code = 2.

@PatrickKursawe
Copy link

PatrickKursawe commented Jan 21, 2020 via email

@totollygeek
Copy link
Author

I tried that. I think that the git credential-manager itself is using it. I can't find any other process accessing it, besides the credential manager. Could this be a bug?

@PatrickKursawe
Copy link

Why are you trying to install it, when it is already installed?

@totollygeek
Copy link
Author

I get the same error when I try to remove it. First I tried that. I thought that if I remove and deploy it again, it might fix it. => Nope.
Then I reinstalled Git for Windows and check the "Enable Credentials Manager". => Same result
Then I reinstalled Git for Windows and DID NOT check the "Enable Credentials Manager". Then I installed it manually using the setup provided here in the Releases section. => Same result
I am running out of options...

@totollygeek
Copy link
Author

Anybody have any idea on this one? I had to disable the manager and enter my credentials manually every time I interact with the remote...

This might be a duplicate of one or more of #703, #750, and/or #793, but it's hard to tell because you've REDACTED the repo URL. If your original logs show that the "get" pass has no username in the URL, but your "delete" pass does, that points to it being similar. I have a similar problem and am about to go and add a comment on #703.

I'm on Windows 10 Pro Version 1909 build 18363.535, Git for Windows 2.24.1.windows.2, and GCM v1.20.0.

The REDACTED URL looks something like that: https://tfs. MyOrg.com/tfs/collection1/someproject/_git/reponame

If that helps...

@Smille02a
Copy link

Smille02a commented Jan 21, 2020 via email

@PatrickKursawe
Copy link

Go to team explorer->settings->git->global settings and check the cryptographic network provider. I guess you have OpenSSL or unset there? Try changing it to Secure Channel.

@Smille02a
Copy link

Smille02a commented Jan 22, 2020 via email

@totollygeek
Copy link
Author

Go to team explorer->settings->git->global settings and check the cryptographic network provider. I guess you have OpenSSL or unset there? Try changing it to Secure Channel.

O.M.G!!!!
That worked!!!!
You should write that as a tutorial somewhere on the main README.md. Maybe handle the exception better to recognize that?

@PatrickKursawe
Copy link

Well, I'm not involved with the project, I'm just a user like you. And, AFAIK, there are valid use cases for the other provider.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants