git-ecosystem / git-credential-manager

Secure, cross-platform Git credential storage with authentication to GitHub, Azure Repos, and other popular Git hosting services.
Other
6.68k stars 1.73k forks source link

Azure Devops Generic Git Credential popup #1159

Closed mgermino closed 1 year ago

mgermino commented 1 year ago

Version

2.0.035+8b4735fc7b

Operating system

Windows

OS version or distribution

Windows 11 x64

Git hosting provider(s)

Azure DevOps

Other hosting provider

No response

(Azure DevOps only) What format is your remote URL?

https://{org}@dev.azure.com/{org}

Can you access the remote repository directly in the browser?

Yes, I can access the repository

Expected behavior

I have multiple projects in my org. I expect to clone a repository for the first time as well as run other git commands without being prompted to log into the Git Credential Manager

Actual behavior

I am prompted with the "Git Credential Manager" whenever I clone a new repository for the first time. This forces me to use a PAT. Shouldn't I be prompted to log into Azure/Microsoft?

I am unsure what has changed on my machine, however this popup didn't happen before. I only had to authenticate once and then I was free to clone any repo in the org I wanted to.

credmanager

Logs

When I execute a git pull on a repo.

01:29:55.581226 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin 01:29:55.587227 git.c:439 trace: built-in: git pull 01:29:55.588226 run-command.c:655 trace: run_command: git fetch --update-head-ok 01:29:56.527044 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core 01:29:56.529044 git.c:439 trace: built-in: git fetch --update-head-ok 01:29:56.530044 run-command.c:655 trace: run_command: GIT_DIR=.git git remote-https origin https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo 01:29:57.456368 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core 01:29:57.457366 git.c:725 trace: exec: git-remote-https origin https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo 01:29:57.457366 run-command.c:655 trace: run_command: git-remote-https origin https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo 01:29:58.507221 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core 01:29:58.816077 run-command.c:655 trace: run_command: 'git credential-manager get' 01:30:01.310002 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core 01:30:01.310993 git.c:725 trace: exec: git-credential-manager get 01:30:01.310993 run-command.c:655 trace: run_command: git-credential-manager get 01:30:14.743769 ...\Application.cs:95 trace: [RunInternalAsync] Version: 2.0.935.18315 01:30:14.745772 ...\Application.cs:96 trace: [RunInternalAsync] Runtime: .NET Framework 4.0.30319.42000 01:30:14.745772 ...\Application.cs:97 trace: [RunInternalAsync] Platform: Windows (x86-64) 01:30:14.745772 ...\Application.cs:98 trace: [RunInternalAsync] OSVersion: 10.0 (build 22621) 01:30:14.745772 ...\Application.cs:99 trace: [RunInternalAsync] AppPath: C:\Program Files\Git\mingw64\bin\git-credential-manager 01:30:14.746714 ...\Application.cs:100 trace: [RunInternalAsync] InstallDir: C:\Program Files\Git\mingw64\bin\ 01:30:14.746714 ...\Application.cs:101 trace: [RunInternalAsync] Arguments: get 01:30:14.781791 ...GitCommandBase.cs:33 trace: [ExecuteAsync] Start 'get' command... 01:30:14.788870 ...GitCommandBase.cs:47 trace: [ExecuteAsync] Detecting host provider for input: 01:30:14.788870 ...GitCommandBase.cs:48 trace: [ExecuteAsync] protocol=https 01:30:14.789930 ...GitCommandBase.cs:48 trace: [ExecuteAsync] host=dev.azure.com 01:30:14.789930 ...GitCommandBase.cs:48 trace: [ExecuteAsync] path=MyOrg/MyProject/_git/MyRepo 01:30:14.789930 ...GitCommandBase.cs:48 trace: [ExecuteAsync] username=myEmail@email.com 01:30:15.720343 ...oviderRegistry.cs:99 trace: [GetProviderAsync] Host provider override was set id='generic' 01:30:15.725333 ...GitCommandBase.cs:50 trace: [ExecuteAsync] Host provider 'Generic' was selected. 01:30:15.726329 ...\HostProvider.cs:126 trace: [GetCredentialAsync] Looking for existing credential in store with service=https://dev.azure.com/MyOrg/MyProject/_git/MyRepo account=MyEmail@email.com... 01:30:19.395348 ...\HostProvider.cs:131 trace: [GetCredentialAsync] No existing credentials found. 01:30:19.395348 ...\HostProvider.cs:134 trace: [GetCredentialAsync] Creating new credential... 01:30:21.229865 ...ricOAuthConfig.cs:19 trace: [TryGet] Invalid OAuth configuration - missing/invalid authorize endpoint: 01:30:24.831907 ...icHostProvider.cs:86 trace: [GenerateCredentialAsync] Checking host 'https://dev.azure.com/MyOrg/MyProject/_git/MyRepo' for Windows Integrated Authentication... 01:30:24.835899 ...Authentication.cs:34 trace: [GetIsSupportedAsync] HTTP: HEAD https://dev.azure.com/MyOrg/MyProject/_git/MyRepo 01:30:24.835899 ...pClientFactory.cs:58 trace: [CreateClient] Creating new HTTP client instance... 01:30:38.898433 ...pClientFactory.cs:97 trace: [CreateClient] Custom certificate verification has been enabled with certificate bundle at C:/Program Files/Git/mingw64/etc/ssl/certs/ca-bundle.crt 01:30:39.096236 ...Authentication.cs:37 trace: [GetIsSupportedAsync] HTTP: Response code ignored. 01:30:39.096236 ...Authentication.cs:39 trace: [GetIsSupportedAsync] Inspecting WWW-Authenticate headers... 01:30:39.096236 ...icHostProvider.cs:91 trace: [GenerateCredentialAsync] Host does not support WIA. 01:30:39.096236 ...cHostProvider.cs:113 trace: [GenerateCredentialAsync] Prompting for basic credentials... 01:30:45.402442 ...nticationBase.cs:150 trace: [TryFindHelperCommand] Using default UI helper: 'git-credential-manager-ui'. 01:30:45.402442 ...nticationBase.cs:181 trace: [TryFindHelperCommand] Found in-box native UI helper: 'C:\Program Files\Git\mingw64\bin\git-credential-manager-ui.exe' 01:30:45.404441 ...enticationBase.cs:40 trace: [InvokeHelperAsync] Starting helper process: C:\Program Files\Git\mingw64\bin\git-credential-manager-ui.exe basic --resource https://dev.azure.com/MyOrg/MyProject/_git/MyRepo --username myemail@email.com

mgermino commented 1 year ago

I didn't realize there were two gitconfig files. I deleted the one located in my user folder and that seems to have solved this particular issue.