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

GitHub logon failed with GCM #914

Open
1 of 13 tasks
ThomsonTan opened this issue Sep 18, 2020 · 2 comments
Open
1 of 13 tasks

GitHub logon failed with GCM #914

ThomsonTan opened this issue Sep 18, 2020 · 2 comments

Comments

@ThomsonTan
Copy link

ThomsonTan commented Sep 18, 2020

Which Version of GCM are you using ? 1.20.0
From a command prompt, run git credential-manager version and paste the output.

Which service are you trying to connect to

  • Azure DevOps
  • 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?

  • 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.

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

Expected behavior
Cannot logon to with my account name/password/pass code. It happened many times, and when it happened, the login may succeed after multiple retries (like more than 10 times of retries).

git push
Logon failed, use ctrl+c to cancel basic credential prompt.

Actual behavior
Repeated show login and pass code dialog, and "logon failed" message to console.

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

@dscho dscho changed the title Github logon failed with GCM GitHub logon failed with GCM Sep 28, 2020
@springcomp
Copy link

I have the same problem.
Extract form the logs:

12:58:21.593523 git.c:442               trace: built-in: git push --set-upstream origin main
12:58:21.604160 run-command.c:663       trace: run_command: GIT_DIR=.git git remote-https origin https://github.com/SpringComp/PSReadLine
12:58:21.630072 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:58:21.635336 git.c:702               trace: exec: git-remote-https origin https://github.com/SpringComp/PSReadLine
12:58:21.635336 run-command.c:663       trace: run_command: git-remote-https origin https://github.com/SpringComp/PSReadLine
12:58:21.663098 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:58:22.063444 run-command.c:663       trace: run_command: 'git credential-manager get'
12:58:22.226957 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:58:22.233129 git.c:702               trace: exec: git-credential-manager get
12:58:22.234997 run-command.c:663       trace: run_command: git-credential-manager get
12:58:22.469240 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.20.0) 'get'
12:58:22.610980 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
12:58:22.620011 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 45 entries.
12:58:22.727706 ...\Common.cs:85        trace: [CreateAuthentication] detecting authority type for 'https://github.com/'.
12:58:22.749051 ...uthentication.cs:151 trace: [GetAuthentication] created GitHub authentication for 'https://github.com/'.
12:58:22.750757 ...\Common.cs:176       trace: [CreateAuthentication] authority for 'https://github.com/' is GitHub.
12:58:22.750757 ...\Common.cs:765       trace: [QueryCredentials] querying 'GitHub' for credentials.
12:58:22.799261 ...icationPrompts.cs:50 trace: [CredentialModalPrompt] prompting user for credentials for 'https://github.com/'.
12:58:54.671193 ...\Authority.cs:101    trace: [AcquireToken] server responded with Unauthorized.
12:58:54.677586 ...\Authority.cs:150    trace: [AcquireToken] authentication failed for 'https://github.com/'.
12:58:54.678675 ...uthentication.cs:235 trace: [InteractiveLogon] interactive logon for 'https://github.com/' failed.
12:58:54.682646 ...\Common.cs:878       trace: [QueryCredentials] credentials for 'https://github.com/' not found.
12:58:54.684366 ...\Common.cs:709       trace: [LogEvent] Failed to retrieve GitHub credentials for 'https://github.com/'.
12:58:55.497856 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.20.0) 'get'
12:58:55.652171 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
12:58:55.661341 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 45 entries.
12:58:55.758919 ...\Common.cs:85        trace: [CreateAuthentication] detecting authority type for 'https://github.com/'.
12:58:55.788564 ...uthentication.cs:151 trace: [GetAuthentication] created GitHub authentication for 'https://github.com/'.
12:58:55.789441 ...\Common.cs:176       trace: [CreateAuthentication] authority for 'https://github.com/' is GitHub.
12:58:55.789441 ...\Common.cs:765       trace: [QueryCredentials] querying 'GitHub' for credentials.
12:58:55.844393 ...icationPrompts.cs:50 trace: [CredentialModalPrompt] prompting user for credentials for 'https://github.com/'.
13:01:03.730891 ...uthentication.cs:235 trace: [InteractiveLogon] interactive logon for 'https://github.com/' failed.
13:01:03.732912 ...\Common.cs:878       trace: [QueryCredentials] credentials for 'https://github.com/' not found.
13:01:03.735904 ...\Common.cs:709       trace: [LogEvent] Failed to retrieve GitHub credentials for 'https://github.com/'.
13:01:03.743936 ...\Program.cs:414      trace: [Get] Logon failed, use ctrl+c to cancel basic credential prompt.
Logon failed, use ctrl+c to cancel basic credential prompt.

Logins are coming from a Password Manager and work successfully after a logout | login in a Web browser.

@ThomsonTan
Copy link
Author

@springcomp for my case, I have 2 factors authentication enabled. It worked if I log in with Github PAT instead of password.

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

2 participants