Skip to content

Still showing prompt with multiple accounts even though they're equivalent #1368

Closed
@chrisant996

Description

@chrisant996

Version

2.2.2

Operating system

Windows

OS version or distribution

Windows 10 Pro 22H2 19045.3208

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

Running git push should proceed without any prompt.

Actual behavior

Running git push shows a graphical prompt asking me to choose between "chrisant996" and "chrisant996", with no way to tell how they're different.

Running cmdkey /list:git* reveals that they're equivalent:

c:\repos\project> cmdkey /list:git:*

Currently stored credentials for git:*:

... snip ...

    Target: git:https://github.com
    Type: Generic
    User: chrisant996
    Local machine persistence

    Target: git:https://[email protected]
    Type: Generic
    User: chrisant996
    Local machine persistence

... snip...

These accounts are equivalent.
There should not be a prompt.

I shouldn't have to delete one of the targets to make the prompt go away.
Especially since pressing Esc in the prompt succeeds!

The reason the authentication succeeds even after cancelling the GCM prompt is because git config credential.manager is set to wincred. When GCM fails, the auth ends up succeeding because wincred uses the cached credentials correctly.

Logs

10:14:35.953346 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
10:14:35.968979 git.c:462 trace: built-in: git push
10:14:35.968979 run-command.c:661 trace: run_command: GIT_DIR=.git git remote-https origin https://github.com/chrisant996/clink.git
10:14:35.984615 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:14:35.984615 git.c:748 trace: exec: git-remote-https origin https://github.com/chrisant996/clink.git
10:14:35.984615 run-command.c:661 trace: run_command: git-remote-https origin https://github.com/chrisant996/clink.git
10:14:36.000222 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:14:36.187723 run-command.c:661 trace: run_command: 'C:/Program\ Files/Git/mingw64/bin/git-credential-manager.exe get'
10:14:36.312738 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:14:36.312738 git.c:462 trace: built-in: git config --null --list
10:14:36.359596 ...\Application.cs:106 trace: [RunInternalAsync] Version: 2.2.2.0
10:14:36.359596 ...\Application.cs:107 trace: [RunInternalAsync] Runtime: .NET Framework 4.0.30319.42000
10:14:36.359596 ...\Application.cs:108 trace: [RunInternalAsync] Platform: Windows (x86-64)
10:14:36.359596 ...\Application.cs:109 trace: [RunInternalAsync] OSVersion: 10.0 (build 19045)
10:14:36.359596 ...\Application.cs:110 trace: [RunInternalAsync] AppPath: C:\Program Files\Git\mingw64\bin\git-credential-manager.exe
10:14:36.359596 ...\Application.cs:111 trace: [RunInternalAsync] InstallDir: C:\Program Files\Git\mingw64\bin
10:14:36.359596 ...\Application.cs:112 trace: [RunInternalAsync] Arguments: get
10:14:36.390877 ...GitCommandBase.cs:32 trace: [ExecuteAsync] Start 'get' command...
10:14:36.406472 ...GitCommandBase.cs:46 trace: [ExecuteAsync] Detecting host provider for input:
10:14:36.406472 ...GitCommandBase.cs:47 trace: [ExecuteAsync] protocol=https
10:14:36.406472 ...GitCommandBase.cs:47 trace: [ExecuteAsync] host=github.com
10:14:36.406472 ...GitCommandBase.cs:47 trace: [ExecuteAsync] wwwauth=Basic realm="GitHub"
10:14:36.406472 ...viderRegistry.cs:149 trace: [GetProviderAsync] Performing auto-detection of host provider.
10:14:36.406472 ...viderRegistry.cs:162 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms.
10:14:36.406472 ...viderRegistry.cs:170 trace: [GetProviderAsync] Checking against 4 host providers registered with priority 'Normal'.
10:14:36.406472 ...GitCommandBase.cs:49 trace: [ExecuteAsync] Host provider 'GitHub' was selected.
10:14:36.422133 ...bHostProvider.cs:142 trace: [GetCredentialAsync] Found 2 accounts in the store for service=https://github.com:
10:14:36.422133 ...bHostProvider.cs:145 trace: [GetCredentialAsync] chrisant996
10:14:36.422133 ...bHostProvider.cs:145 trace: [GetCredentialAsync] chrisant996
10:14:36.422133 ...bHostProvider.cs:218 trace: [FilterAccounts] Account filtering is enabled.
10:14:36.437754 ...bHostProvider.cs:226 trace: [FilterAccounts] Filtering based on WWW-Authenticate header information...
10:14:36.437754 ...bHostProvider.cs:229 trace: [FilterAccounts] Matched 2 accounts with public domain:
10:14:36.437754 ...bHostProvider.cs:234 trace: [FilterAccounts] chrisant996
10:14:36.437754 ...bHostProvider.cs:234 trace: [FilterAccounts] chrisant996
10:14:36.437754 ...bHostProvider.cs:158 trace: [GetCredentialAsync] Multiple accounts available - prompting user to select one...
10:14:36.468972 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:14:36.468972 git.c:462 trace: built-in: git version
10:14:36.484597 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:14:36.484597 git.c:462 trace: built-in: git config --null --type=path credential.https://proxy-git.cwkhome.fun.gitHubHelper
10:14:36.500222 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:14:36.515847 git.c:462 trace: built-in: git config --null --type=path credential.github.com.gitHubHelper
10:14:36.531472 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:14:36.531472 git.c:462 trace: built-in: git config --null --type=path credential.gitHubHelper
fatal: User cancelled dialog.
at GitCredentialManager.Authentication.AuthenticationBase.ThrowIfWindowCancelled(WindowViewModel viewModel)
at GitHub.GitHubAuthentication.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at GitHub.GitHubHostProvider.<GetCredentialAsync>d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at GitCredentialManager.Commands.GetCommand.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at GitCredentialManager.Commands.GitCommandBase.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Invocation.AnonymousCommandHandler.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__18_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__5_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<b__0>d.MoveNext()
10:14:45.179802 run-command.c:661 trace: run_command: 'git credential-wincred get'
10:14:45.226676 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:14:45.226676 git.c:748 trace: exec: git-credential-wincred get
10:14:45.226676 run-command.c:661 trace: run_command: git-credential-wincred get
10:14:45.414177 run-command.c:661 trace: run_command: 'C:/Program\ Files/Git/mingw64/bin/git-credential-manager.exe store'
10:14:45.539177 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:14:45.539177 git.c:462 trace: built-in: git config --null --list
10:14:45.570428 ...\Application.cs:106 trace: [RunInternalAsync] Version: 2.2.2.0
10:14:45.570428 ...\Application.cs:107 trace: [RunInternalAsync] Runtime: .NET Framework 4.0.30319.42000
10:14:45.570428 ...\Application.cs:108 trace: [RunInternalAsync] Platform: Windows (x86-64)
10:14:45.570428 ...\Application.cs:109 trace: [RunInternalAsync] OSVersion: 10.0 (build 19045)
10:14:45.570428 ...\Application.cs:110 trace: [RunInternalAsync] AppPath: C:\Program Files\Git\mingw64\bin\git-credential-manager.exe
10:14:45.570428 ...\Application.cs:111 trace: [RunInternalAsync] InstallDir: C:\Program Files\Git\mingw64\bin
10:14:45.570428 ...\Application.cs:112 trace: [RunInternalAsync] Arguments: store
10:14:45.617303 ...GitCommandBase.cs:32 trace: [ExecuteAsync] Start 'store' command...
10:14:45.617303 ...GitCommandBase.cs:46 trace: [ExecuteAsync] Detecting host provider for input:
10:14:45.617303 ...GitCommandBase.cs:47 trace: [ExecuteAsync] protocol=https
10:14:45.617303 ...GitCommandBase.cs:47 trace: [ExecuteAsync] host=github.com
10:14:45.617303 ...GitCommandBase.cs:47 trace: [ExecuteAsync] username=chrisant996
10:14:45.617303 ...GitCommandBase.cs:47 trace: [ExecuteAsync] password=********
10:14:45.632960 ...viderRegistry.cs:149 trace: [GetProviderAsync] Performing auto-detection of host provider.
10:14:45.632960 ...viderRegistry.cs:162 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms.
10:14:45.632960 ...viderRegistry.cs:170 trace: [GetProviderAsync] Checking against 4 host providers registered with priority 'Normal'.
10:14:45.632960 ...GitCommandBase.cs:49 trace: [ExecuteAsync] Host provider 'GitHub' was selected.
10:14:45.632960 ...bHostProvider.cs:257 trace: [StoreCredentialAsync] Storing credential with service=https://github.com account=chrisant996...
10:14:45.632960 ...bHostProvider.cs:259 trace: [StoreCredentialAsync] Credential was successfully stored.
10:14:45.632960 ...GitCommandBase.cs:53 trace: [ExecuteAsync] End 'store' command...
10:14:45.648588 run-command.c:661 trace: run_command: 'git credential-wincred store'
10:14:45.695428 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:14:45.695428 git.c:748 trace: exec: git-credential-wincred store
10:14:45.695428 run-command.c:661 trace: run_command: git-credential-wincred store
Everything up-to-date

Metadata

Metadata

Assignees

No one assigned

    Labels

    auth-issueAn issue authenticating to a host

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions