Git-Credential-Manager-for-Windows icon indicating copy to clipboard operation
Git-Credential-Manager-for-Windows copied to clipboard

Can't authenticane aginst LAN Azure DevOps.

Open v-andrew opened this issue 6 years ago • 3 comments

Which Version of GCM are you using ? From a command prompt, run git credential-manager version and paste the output. Git Credential Manager for Windows version 1.19.0

Which service are you trying to connect to

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

If AzureDevops Hosted describe your url

  • [ ] dev.azure.com/org
  • [ ] org.visualstudio.com

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

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

If you're using Azure DevOps, and the account picker shows more than one identity as you authenticate, check that you selected the same one that has access on the web.

  • [X] I only see one identity.
  • [ ] I checked each and none worked.

Expected behavior Credential Manager pops up and asks me for credentials. Or Credential manager uses credentials I saved in Credential Manager for that URL

Actual behavior No popups when I run git clone http://...

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

14:43:49.124667 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
14:43:49.124667 git.c:419               trace: built-in: git clone http://192.168.1.122:1080/Home/Home-Drive/_git/Home-Drive
Cloning into 'Home-Drive'...
14:43:49.140288 run-command.c:643       trace: run_command: git remote-http origin http://192.168.1.122:1080/Home/Home-Drive/_git/Home-Drive
14:43:49.155909 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:43:49.155909 git.c:676               trace: exec: git-remote-http origin http://192.168.1.122:1080/Home/Home-Drive/_git/Home-Drive
14:43:49.155909 run-command.c:643       trace: run_command: git-remote-http origin http://192.168.1.122:1080/Home/Home-Drive/_git/Home-Drive
14:43:49.155909 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:43:49.171562 run-command.c:643       trace: run_command: 'git credential-manager get'
14:43:49.218396 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:43:49.218396 git.c:676               trace: exec: git-credential-manager get
14:43:49.218396 run-command.c:643       trace: run_command: git-credential-manager get
14:43:49.280881 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.19.0) 'get'
14:43:49.327775 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
14:43:49.327775 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 22 entries.
14:43:49.327775 ...\Common.cs:505       trace: [LoadOperationArguments] writeLog = 'True'.
14:43:49.327775 ...\Common.cs:513       trace: [LoadOperationArguments] modalPrompt = 'True'.
14:43:49.343396 ...\Common.cs:318       trace: [EnableTraceLogging] trace logging enabled.
14:43:49.343396 ...\Common.cs:334       trace: [EnableTraceLogging] git global config found at 'C:\Users\Andrew\.gitconfig'.
14:43:49.343396 ...\Common.cs:378       trace: [EnableTraceLoggingFile] trace log destination is 'C:\Users\Andrew'.
14:43:49.374656 ...\Common.cs:85        trace: [CreateAuthentication] detecting authority type for 'http://192.168.1.122:1080/'.
14:43:49.390231 ...\Common.cs:224       trace: [CreateAuthentication] authority for 'http://192.168.1.122:1080/' is basic with NTLM=Auto.
14:43:49.390231 ...\Common.cs:765       trace: [QueryCredentials] querying 'Auto' for credentials.
14:43:49.452858 ...uthentication.cs:119 trace: [AcquireCredentials] 'http://192.168.1.122:1080/' supports NTLM, sending NTLM credentials instead
14:43:49.452858 ...\Common.cs:780       trace: [QueryCredentials] credentials found.
14:43:49.484100 run-command.c:643       trace: run_command: 'git credential-manager erase'
14:43:49.515242 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:43:49.515242 git.c:676               trace: exec: git-credential-manager erase
14:43:49.515242 run-command.c:643       trace: run_command: git-credential-manager erase
14:43:49.577686 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.19.0) 'erase'
14:43:49.624584 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
14:43:49.624584 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 22 entries.
14:43:49.624584 ...\Common.cs:505       trace: [LoadOperationArguments] writeLog = 'True'.
14:43:49.640170 ...\Common.cs:513       trace: [LoadOperationArguments] modalPrompt = 'True'.
14:43:49.640170 ...\Common.cs:318       trace: [EnableTraceLogging] trace logging enabled.
14:43:49.640170 ...\Common.cs:334       trace: [EnableTraceLogging] git global config found at 'C:\Users\Andrew\.gitconfig'.
14:43:49.640170 ...\Common.cs:378       trace: [EnableTraceLoggingFile] trace log destination is 'C:\Users\Andrew'.
14:43:49.671460 ...\Common.cs:85        trace: [CreateAuthentication] detecting authority type for 'http://192.168.1.122:1080/'.
14:43:49.671460 ...\Common.cs:224       trace: [CreateAuthentication] authority for 'http://192.168.1.122:1080/' is basic with NTLM=Auto.
14:43:49.671460 ...\Common.cs:252       trace: [DeleteCredentials] deleting basic credentials for 'http://192.168.1.122:1080/'.
14:43:49.687065 ...aseSecureStore.cs:59 trace: [Delete] credentials not found for 'git:http://192.168.1.122:1080'.
14:43:49.702708 run-command.c:643       trace: run_command: 'git credential-manager erase'
14:43:49.733901 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:43:49.733901 git.c:676               trace: exec: git-credential-manager erase
14:43:49.733901 run-command.c:643       trace: run_command: git-credential-manager erase
14:43:49.780764 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.19.0) 'erase'
14:43:49.843292 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
14:43:49.843292 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 22 entries.
14:43:49.843292 ...\Common.cs:505       trace: [LoadOperationArguments] writeLog = 'True'.
14:43:49.843292 ...\Common.cs:513       trace: [LoadOperationArguments] modalPrompt = 'True'.
14:43:49.843292 ...\Common.cs:318       trace: [EnableTraceLogging] trace logging enabled.
14:43:49.843292 ...\Common.cs:334       trace: [EnableTraceLogging] git global config found at 'C:\Users\Andrew\.gitconfig'.
14:43:49.858915 ...\Common.cs:378       trace: [EnableTraceLoggingFile] trace log destination is 'C:\Users\Andrew'.
14:43:49.890114 ...\Common.cs:85        trace: [CreateAuthentication] detecting authority type for 'http://192.168.1.122:1080/'.
14:43:49.890114 ...\Common.cs:224       trace: [CreateAuthentication] authority for 'http://192.168.1.122:1080/' is basic with NTLM=Auto.
14:43:49.890114 ...\Common.cs:252       trace: [DeleteCredentials] deleting basic credentials for 'http://192.168.1.122:1080/'.
14:43:49.905734 ...aseSecureStore.cs:59 trace: [Delete] credentials not found for 'git:http://192.168.1.122:1080'.
fatal: Authentication failed for 'http://192.168.1.122:1080/Home/Home-Drive/_git/Home-Drive/'
  • I renamed my local user from Andrew to Andre so it doesn't try to use localMachineName\Andrew as a user Id

v-andrew avatar May 12 '19 18:05 v-andrew

It looks like the server is trying to use NTLM and failing. I would talk to your TFS administrator about the auth setup here.

In the meantime, you can turn your GCM to basic authentication using the following commands:

  • Run “git config --global credential.authority Basic” this should move you to basic auth
  • You should now get a popup that says “Git Credential Manager for Windows” across the top and lets you fill in username/password

If your username/password don't work here, a PAT entered as username will.

jeschu1 avatar May 28 '19 13:05 jeschu1

I'm my TFS administrator. I purchased basic version.

@jeschu1 Please talk to me :)

BTW, there is one more problem, I can't login to web UI anymore from emote desktop. It asks for the basic auth and declines.

The same credentials works just fine on local computer.

I do not want to switch global git credentials to basic auth. I use ssh, but been unable to login to web UI is a killer.

v-andrew avatar May 29 '19 00:05 v-andrew

@v-andrew, ssh is definitely a great choice for communicating with TFS. That doesn't use GCM, but it's a recommended option.

TFS support is your best option for the Web UI. They should be able to help you with any connectivity issues there.

jeschu1 avatar May 29 '19 13:05 jeschu1