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.71k stars 1.75k forks source link

GCM 2.2.0 and newer prompt for Sign in on every command to GitHub #1477

Open chrisallennc opened 10 months ago

chrisallennc commented 10 months ago

Version

2.2.0 and newer

Operating system

Windows

OS version or distribution

Windows 11

Git hosting provider(s)

GitHub

Other hosting provider

No response

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

None

Can you access the remote repository directly in the browser?

Yes, I can access the repository

Expected behavior

Git command executes and user is not prompted to Sign in. Up until GCM 2.1.2 this was the case.

Actual behavior

Every time a Git command is executed, like "pull", a prompt appears to Sign in. Based on the log it appears to not be finding an existing credential. This happens with GCM 2.2.0 and every version following.

Logs

GCM 2.2.0 and newer (issue): $ git pull 15:07:07.434480 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/bin 15:07:07.450204 git.c:463 trace: built-in: git pull 15:07:07.450204 run-command.c:659 trace: run_command: git fetch --update-head-ok 15:07:07.496986 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:07.496986 git.c:463 trace: built-in: git fetch --update-head-ok 15:07:07.506999 run-command.c:659 trace: run_command: GIT_DIR=.git git remote-https GitHub https://github.com/orgName/repoName.git 15:07:07.559999 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:07.559999 git.c:749 trace: exec: git-remote-https GitHub https://github.com/orgName/repoName.git 15:07:07.559999 run-command.c:659 trace: run_command: git-remote-https GitHub https://github.com/orgName/repoName.git 15:07:07.623023 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:07.953546 run-command.c:659 trace: run_command: 'git credential-manager get' 15:07:08.133038 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:08.133038 git.c:749 trace: exec: git-credential-manager get 15:07:08.133038 run-command.c:659 trace: run_command: git-credential-manager get 15:07:08.289711 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:08.308839 git.c:463 trace: built-in: git config --null --list 15:07:08.352606 ...\Application.cs:106 trace: [RunInternalAsync] Version: 2.4.1.0 15:07:08.352606 ...\Application.cs:107 trace: [RunInternalAsync] Runtime: .NET Framework 4.8.9181.0 15:07:08.352606 ...\Application.cs:108 trace: [RunInternalAsync] Platform: Windows (x86-64) 15:07:08.352606 ...\Application.cs:109 trace: [RunInternalAsync] OSVersion: 10.0 (build 22631) 15:07:08.352606 ...\Application.cs:110 trace: [RunInternalAsync] AppPath: C:\Users\userName\AppData\Local\Programs\Git\mingw64\bin\git-credential-manager.exe 15:07:08.352606 ...\Application.cs:111 trace: [RunInternalAsync] InstallDir: C:\Users\userName\AppData\Local\Programs\Git\mingw64\bin\ 15:07:08.352606 ...\Application.cs:112 trace: [RunInternalAsync] Arguments: get 15:07:08.383859 ...GitCommandBase.cs:32 trace: [ExecuteAsync] Start 'get' command... 15:07:08.383859 ...GitCommandBase.cs:46 trace: [ExecuteAsync] Detecting host provider for input: 15:07:08.383859 ...GitCommandBase.cs:47 trace: [ExecuteAsync] protocol=https 15:07:08.383859 ...GitCommandBase.cs:47 trace: [ExecuteAsync] host=github.com 15:07:08.383859 ...GitCommandBase.cs:47 trace: [ExecuteAsync] wwwauth=Basic realm="GitHub" 15:07:08.383859 ...viderRegistry.cs:149 trace: [GetProviderAsync] Performing auto-detection of host provider. 15:07:08.383859 ...viderRegistry.cs:162 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms. 15:07:08.383859 ...viderRegistry.cs:170 trace: [GetProviderAsync] Checking against 4 host providers registered with priority 'Normal'. 15:07:08.383859 ...GitCommandBase.cs:49 trace: [ExecuteAsync] Host provider 'GitHub' was selected. 15:07:08.399503 ...bHostProvider.cs:142 trace: [GetCredentialAsync] Found 1 accounts in the store for service=https://github.com: 15:07:08.399503 ...bHostProvider.cs:145 trace: [GetCredentialAsync] gitHubUser 15:07:08.399503 ...bHostProvider.cs:218 trace: [FilterAccounts] Account filtering is enabled. 15:07:08.399503 ...bHostProvider.cs:226 trace: [FilterAccounts] Filtering based on WWW-Authenticate header information... 15:07:08.399503 ...bHostProvider.cs:229 trace: [FilterAccounts] Matched 0 accounts with public domain: 15:07:08.399503 ...bHostProvider.cs:181 trace: [GetCredentialAsync] No existing credentials found. 15:07:08.399503 ...bHostProvider.cs:184 trace: [GetCredentialAsync] Creating new credential... 15:07:08.409046 ...bHostProvider.cs:420 trace: [GetSupportedAuthenticationModesAsync] https://github.com/ is github.com - authentication schemes: 'Pat, OAuth' 15:07:08.446934 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:08.462452 git.c:463 trace: built-in: git version 15:07:08.509367 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:08.525014 git.c:463 trace: built-in: git config --null --type=path credential.https://github.com.gitHubHelper 15:07:08.587505 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:08.587505 git.c:463 trace: built-in: git config --null --type=path credential.github.com.gitHubHelper 15:07:08.666091 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:08.681741 git.c:463 trace: built-in: git config --null --type=path credential.gitHubHelper 15:07:24.022974 ...pClientFactory.cs:60 trace: [CreateClient] Creating new HTTP client instance... 15:07:24.054625 ...pClientFactory.cs:80 trace: [CreateClient] Git's SSL/TLS backend is: OpenSsl 15:07:24.137263 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:24.148776 git.c:463 trace: built-in: git config --null --type=path http.https://github.com.sslCAInfo 15:07:24.243673 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:24.243673 git.c:463 trace: built-in: git config --null --type=path http.github.com.sslCAInfo 15:07:24.337378 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:24.353012 git.c:463 trace: built-in: git config --null --type=path http.sslCAInfo 15:07:24.431138 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:24.437645 git.c:463 trace: built-in: git config --null --type=path http.https://github.com.sslCAInfo 15:07:24.525284 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:24.537791 git.c:463 trace: built-in: git config --null --type=path http.github.com.sslCAInfo 15:07:24.619563 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:24.638097 git.c:463 trace: built-in: git config --null --type=path http.sslCAInfo 15:07:24.638097 ...ClientFactory.cs:113 trace: [CreateClient] Custom certificate verification has been enabled with certificate bundle at C:/Users/userName/AppData/Local/Programs/Git/mingw64/etc/ssl/certs/ca-bundle.crt 15:07:24.729281 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:24.729281 git.c:463 trace: built-in: git config --null --type=path http.https://github.com.cookieFile 15:07:24.823434 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:24.823434 git.c:463 trace: built-in: git config --null --type=path http.github.com.cookieFile 15:07:24.917581 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:24.938425 git.c:463 trace: built-in: git config --null --type=path http.cookieFile 15:07:26.146798 ...\GitHubRestApi.cs:96 trace: [GetUserInfoAsync] HTTP: GET https://api.github.com/user 15:07:26.146798 ...pClientFactory.cs:60 trace: [CreateClient] Creating new HTTP client instance... 15:07:26.146798 ...pClientFactory.cs:80 trace: [CreateClient] Git's SSL/TLS backend is: OpenSsl 15:07:26.224937 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:26.240974 git.c:463 trace: built-in: git config --null --type=path http.https://github.com.sslCAInfo 15:07:26.339885 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:26.350903 git.c:463 trace: built-in: git config --null --type=path http.github.com.sslCAInfo 15:07:26.461111 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:26.476641 git.c:463 trace: built-in: git config --null --type=path http.sslCAInfo 15:07:26.586730 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:26.602289 git.c:463 trace: built-in: git config --null --type=path http.https://github.com.sslCAInfo 15:07:26.712243 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:26.727819 git.c:463 trace: built-in: git config --null --type=path http.github.com.sslCAInfo 15:07:26.822120 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:26.822120 git.c:463 trace: built-in: git config --null --type=path http.sslCAInfo 15:07:26.822120 ...ClientFactory.cs:113 trace: [CreateClient] Custom certificate verification has been enabled with certificate bundle at C:/Users/userName/AppData/Local/Programs/Git/mingw64/etc/ssl/certs/ca-bundle.crt 15:07:26.916407 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:26.932002 git.c:463 trace: built-in: git config --null --type=path http.https://github.com.cookieFile 15:07:27.041190 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:27.048203 git.c:463 trace: built-in: git config --null --type=path http.github.com.cookieFile 15:07:27.143357 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:27.143357 git.c:463 trace: built-in: git config --null --type=path http.cookieFile 15:07:27.362920 ...GitHubRestApi.cs:103 trace: [GetUserInfoAsync] HTTP: Response 200 [OK] 15:07:27.378573 ...bHostProvider.cs:186 trace: [GetCredentialAsync] Credential created. 15:07:27.378573 ...\GetCommand.cs:39 trace: [ExecuteInternalAsync] Writing credentials to output: 15:07:27.378573 ...\GetCommand.cs:40 trace: [ExecuteInternalAsync] protocol=https 15:07:27.378573 ...\GetCommand.cs:40 trace: [ExecuteInternalAsync] host=github.com 15:07:27.378573 ...\GetCommand.cs:40 trace: [ExecuteInternalAsync] username=gitHubUser 15:07:27.378573 ...\GetCommand.cs:40 trace: [ExecuteInternalAsync] password=**** 15:07:27.378573 ...GitCommandBase.cs:53 trace: [ExecuteAsync] End 'get' command... 15:07:28.116857 run-command.c:659 trace: run_command: 'git credential-manager store' 15:07:28.368309 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:28.368309 git.c:749 trace: exec: git-credential-manager store 15:07:28.368309 run-command.c:659 trace: run_command: git-credential-manager store 15:07:28.634932 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:28.644466 git.c:463 trace: built-in: git config --null --list 15:07:28.682345 ...\Application.cs:106 trace: [RunInternalAsync] Version: 2.4.1.0 15:07:28.682345 ...\Application.cs:107 trace: [RunInternalAsync] Runtime: .NET Framework 4.8.9181.0 15:07:28.682345 ...\Application.cs:108 trace: [RunInternalAsync] Platform: Windows (x86-64) 15:07:28.682345 ...\Application.cs:109 trace: [RunInternalAsync] OSVersion: 10.0 (build 22631) 15:07:28.682345 ...\Application.cs:110 trace: [RunInternalAsync] AppPath: C:\Users\userName\AppData\Local\Programs\Git\mingw64\bin\git-credential-manager.exe 15:07:28.682345 ...\Application.cs:111 trace: [RunInternalAsync] InstallDir: C:\Users\userName\AppData\Local\Programs\Git\mingw64\bin\ 15:07:28.682345 ...\Application.cs:112 trace: [RunInternalAsync] Arguments: store 15:07:28.713491 ...GitCommandBase.cs:32 trace: [ExecuteAsync] Start 'store' command... 15:07:28.713491 ...GitCommandBase.cs:46 trace: [ExecuteAsync] Detecting host provider for input: 15:07:28.713491 ...GitCommandBase.cs:47 trace: [ExecuteAsync] protocol=https 15:07:28.713491 ...GitCommandBase.cs:47 trace: [ExecuteAsync] host=github.com 15:07:28.713491 ...GitCommandBase.cs:47 trace: [ExecuteAsync] username=gitHubUser 15:07:28.713491 ...GitCommandBase.cs:47 trace: [ExecuteAsync] password=**** 15:07:28.713491 ...viderRegistry.cs:149 trace: [GetProviderAsync] Performing auto-detection of host provider. 15:07:28.713491 ...viderRegistry.cs:162 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms. 15:07:28.713491 ...viderRegistry.cs:170 trace: [GetProviderAsync] Checking against 4 host providers registered with priority 'Normal'. 15:07:28.713491 ...GitCommandBase.cs:49 trace: [ExecuteAsync] Host provider 'GitHub' was selected. 15:07:28.713491 ...bHostProvider.cs:257 trace: [StoreCredentialAsync] Storing credential with service=https://github.com account=gitHubUser... 15:07:28.729213 ...bHostProvider.cs:259 trace: [StoreCredentialAsync] Credential was successfully stored. 15:07:28.729213 ...GitCommandBase.cs:53 trace: [ExecuteAsync] End 'store' command... 15:07:28.964563 run-command.c:659 trace: run_command: git rev-list --objects --stdin --not --exclude-hidden=fetch --all --quiet --alternate-refs 15:07:29.090687 run-command.c:1523 run_processes_parallel: preparing to run up to 1 tasks 15:07:29.090687 run-command.c:1551 run_processes_parallel: done 15:07:29.090687 run-command.c:659 trace: run_command: git maintenance run --auto --no-quiet 15:07:29.184903 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:29.184903 git.c:463 trace: built-in: git maintenance run --auto --no-quiet 15:07:29.200621 run-command.c:659 trace: run_command: git merge FETCH_HEAD 15:07:29.294493 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:07:29.294493 git.c:463 trace: built-in: git merge FETCH_HEAD Already up to date. 15:07:30.055872 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/bin 15:07:30.062876 git.c:463 trace: built-in: git config --bool core.sparseCheckout

GCM 2.1.2 (working as expected): $ git pull 15:08:55.989449 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/bin 15:08:55.989449 git.c:463 trace: built-in: git pull 15:08:55.989449 run-command.c:659 trace: run_command: git fetch --update-head-ok 15:08:56.055170 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:08:56.070786 git.c:463 trace: built-in: git fetch --update-head-ok 15:08:56.070786 run-command.c:659 trace: run_command: GIT_DIR=.git git remote-https GitHub https://github.com/orgName/repoName.git 15:08:56.149421 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:08:56.149421 git.c:749 trace: exec: git-remote-https GitHub https://github.com/orgName/repoName.git 15:08:56.149421 run-command.c:659 trace: run_command: git-remote-https GitHub https://github.com/orgName/repoName.git 15:08:56.243650 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:08:56.636059 run-command.c:659 trace: run_command: 'C:/Program\ Files\ (x86)/Git\ Credential\ Manager/git-credential-manager.exe get' 15:08:57.045403 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:08:57.061106 git.c:463 trace: built-in: git config --null --list 15:08:57.092809 ...\Application.cs:95 trace: [RunInternalAsync] Version: 2.1.2.0 15:08:57.092809 ...\Application.cs:96 trace: [RunInternalAsync] Runtime: .NET Framework 4.0.30319.42000 15:08:57.092809 ...\Application.cs:97 trace: [RunInternalAsync] Platform: Windows (x86-64) 15:08:57.092809 ...\Application.cs:98 trace: [RunInternalAsync] OSVersion: 10.0 (build 22631) 15:08:57.092809 ...\Application.cs:99 trace: [RunInternalAsync] AppPath: C:\Program Files (x86)\Git Credential Manager\git-credential-manager.exe 15:08:57.092809 ...\Application.cs:100 trace: [RunInternalAsync] InstallDir: C:\Program Files (x86)\Git Credential Manager\ 15:08:57.092809 ...\Application.cs:101 trace: [RunInternalAsync] Arguments: get 15:08:57.124108 ...GitCommandBase.cs:33 trace: [ExecuteAsync] Start 'get' command... 15:08:57.124108 ...GitCommandBase.cs:47 trace: [ExecuteAsync] Detecting host provider for input: 15:08:57.139695 ...GitCommandBase.cs:48 trace: [ExecuteAsync] protocol=https 15:08:57.139695 ...GitCommandBase.cs:48 trace: [ExecuteAsync] host=github.com 15:08:57.139695 ...GitCommandBase.cs:48 trace: [ExecuteAsync] wwwauth[]=Basic realm="GitHub" 15:08:57.139695 ...viderRegistry.cs:149 trace: [GetProviderAsync] Performing auto-detection of host provider. 15:08:57.139695 ...viderRegistry.cs:162 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms. 15:08:57.139695 ...viderRegistry.cs:170 trace: [GetProviderAsync] Checking against 4 host providers registered with priority 'Normal'. 15:08:57.139695 ...GitCommandBase.cs:50 trace: [ExecuteAsync] Host provider 'GitHub' was selected. 15:08:57.139695 ...\HostProvider.cs:126 trace: [GetCredentialAsync] Looking for existing credential in store with service=https://github.com account=... 15:08:57.139695 ...\HostProvider.cs:140 trace: [GetCredentialAsync] Existing credential found. 15:08:57.139695 ...\GetCommand.cs:39 trace: [ExecuteInternalAsync] Writing credentials to output: 15:08:57.139695 ...\GetCommand.cs:40 trace: [ExecuteInternalAsync] protocol=https 15:08:57.139695 ...\GetCommand.cs:40 trace: [ExecuteInternalAsync] host=github.com 15:08:57.139695 ...\GetCommand.cs:40 trace: [ExecuteInternalAsync] username=gitHubUser 15:08:57.139695 ...\GetCommand.cs:40 trace: [ExecuteInternalAsync] password=**** 15:08:57.139695 ...GitCommandBase.cs:54 trace: [ExecuteAsync] End 'get' command... 15:08:57.344541 run-command.c:659 trace: run_command: 'C:/Program\ Files\ (x86)/Git\ Credential\ Manager/git-credential-manager.exe store' 15:08:57.717160 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:08:57.717160 git.c:463 trace: built-in: git config --null --list 15:08:57.747378 ...\Application.cs:95 trace: [RunInternalAsync] Version: 2.1.2.0 15:08:57.747378 ...\Application.cs:96 trace: [RunInternalAsync] Runtime: .NET Framework 4.0.30319.42000 15:08:57.747378 ...\Application.cs:97 trace: [RunInternalAsync] Platform: Windows (x86-64) 15:08:57.747378 ...\Application.cs:98 trace: [RunInternalAsync] OSVersion: 10.0 (build 22631) 15:08:57.747378 ...\Application.cs:99 trace: [RunInternalAsync] AppPath: C:\Program Files (x86)\Git Credential Manager\git-credential-manager.exe 15:08:57.747378 ...\Application.cs:100 trace: [RunInternalAsync] InstallDir: C:\Program Files (x86)\Git Credential Manager\ 15:08:57.747378 ...\Application.cs:101 trace: [RunInternalAsync] Arguments: store 15:08:57.787663 ...GitCommandBase.cs:33 trace: [ExecuteAsync] Start 'store' command... 15:08:57.796199 ...GitCommandBase.cs:47 trace: [ExecuteAsync] Detecting host provider for input: 15:08:57.796199 ...GitCommandBase.cs:48 trace: [ExecuteAsync] protocol=https 15:08:57.796199 ...GitCommandBase.cs:48 trace: [ExecuteAsync] host=github.com 15:08:57.796199 ...GitCommandBase.cs:48 trace: [ExecuteAsync] username=gitHubUser 15:08:57.796199 ...GitCommandBase.cs:48 trace: [ExecuteAsync] password=**** 15:08:57.796199 ...viderRegistry.cs:149 trace: [GetProviderAsync] Performing auto-detection of host provider. 15:08:57.796199 ...viderRegistry.cs:162 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms. 15:08:57.796199 ...viderRegistry.cs:170 trace: [GetProviderAsync] Checking against 4 host providers registered with priority 'Normal'. 15:08:57.796199 ...GitCommandBase.cs:50 trace: [ExecuteAsync] Host provider 'GitHub' was selected. 15:08:57.796199 ...\HostProvider.cs:160 trace: [StoreCredentialAsync] Storing credential with service=https://github.com account=gitHubUser... 15:08:57.796199 ...\HostProvider.cs:162 trace: [StoreCredentialAsync] Credential was successfully stored. 15:08:57.796199 ...GitCommandBase.cs:54 trace: [ExecuteAsync] End 'store' command... 15:08:57.999580 run-command.c:659 trace: run_command: git rev-list --objects --stdin --not --exclude-hidden=fetch --all --quiet --alternate-refs 15:08:58.130085 run-command.c:1523 run_processes_parallel: preparing to run up to 1 tasks 15:08:58.130085 run-command.c:1551 run_processes_parallel: done 15:08:58.130085 run-command.c:659 trace: run_command: git maintenance run --auto --no-quiet 15:08:58.224445 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:08:58.239998 git.c:463 trace: built-in: git maintenance run --auto --no-quiet 15:08:58.239998 run-command.c:659 trace: run_command: git merge FETCH_HEAD 15:08:58.349863 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/libexec/git-core 15:08:58.365570 git.c:463 trace: built-in: git merge FETCH_HEAD Already up to date. 15:08:59.104314 exec-cmd.c:244 trace: resolved executable dir: C:/Users/userName/AppData/Local/Programs/Git/mingw64/bin 15:08:59.104314 git.c:463 trace: built-in: git config --bool core.sparseCheckout

de1acr0ix commented 9 months ago

@chrisallennc Does the actual value of gitHubUser contain an underscore?

@mjcheetham I am interested in this issue. It seems to be the credential for a managed enterprise user, but GitHub does not respond domain_hint and enterprise_hint. I guess it happens when user is accessing a repo does not belong to the enterprise, and we shall consider this is a match in GitHub.GitHubAuthChallenge.IsDomainMember() method.

replicaJunction commented 9 months ago

I am experiencing the same symptoms with GCM 2.4.1. The affected user account is also a managed enterprise user and does contain an underscore.

chrisallennc commented 9 months ago

@de1acr0ix yes, the user contains an underscore. It looks like we're all -_.

de1acr0ix commented 9 months ago

I probably can try to make a PR. But I am not able to really test it out because I don't really have a managed enterprise user account. So I need some more information from @replicaJunction and @chrisallennc.

There is a workaround by disabling GitHub account filtering. This can be done by either https://github.com/git-ecosystem/git-credential-manager/blob/main/docs/configuration.md#credentialgithubaccountfiltering or https://github.com/git-ecosystem/git-credential-manager/blob/main/docs/environment.md#gcm_github_accountfiltering.

chrisallennc commented 9 months ago

It's occurring when I'm accessing a GitHub repo that's in the enterprise cloud. I give a public repo a try and let you know. I'll also give the workaround at try.

chrisallennc commented 9 months ago

I executed git config --global credential.gitHubAccountFiltering "false" and the problem went away so the workaround works.

After doing that I set it back to "true" and was able to pull a public repo. I'm not sure that required any sort of authentication since it was just a pull of a publicly readable repo. My EMU can't contribute to public repos.

spiltcoffee commented 7 months ago

I think I've figured out why GitHub might not be providing the hints in the WWW-Authenticate header.

In the Enterprise settings, under Settings > Authentication security, there's this option:

image

I've done some quick testing, and when it's on, everything works fine as GitHub returns the hints.

When it's off, the behaviour described by the OP is revealed, as the hints disappear.