Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.33.1: git: 'credential-manager' is not a git command. is still shown with credential.helper=manager-core #3477

Closed
1 task done
yyjdelete opened this issue Oct 18, 2021 · 3 comments
Labels

Comments

@yyjdelete
Copy link

yyjdelete commented Oct 18, 2021

  • I was not able to find an open or closed issue matching what I'm seeing

credential.helper=manager-core is already set, but seems git credential-manager seems still be used somewhere.

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.33.1.windows.1
cpu: x86_64
built from commit: 05d80adb775077d673fab685009ede4a1003ed92
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [版本 10.0.19043.1110]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: Nano
Custom Editor Path: 
Default Branch Option:  
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Core
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Enabled
Enable FSMonitor: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

procmon shown the failed cmd is git credential-manager store and called by git-remote-http, git-remote-http will try to execute both git credential-manager-core store and git credential-manager store, but the second always failed since it's dropped now.(git-for-windows/build-extra#377)

Logs with GCM_TRACE=1 and GIT_TRACE=1

>git pull
14:37:14.531794 exec-cmd.c:237          trace: resolved executable dir: D:/Tools/Git/mingw64/bin
14:37:14.537798 git.c:455               trace: built-in: git pull
14:37:14.540782 run-command.c:666       trace: run_command: git fetch --update-head-ok
14:37:14.574778 exec-cmd.c:237          trace: resolved executable dir: D:/Tools/Git/mingw64/libexec/git-core
14:37:14.580774 git.c:455               trace: built-in: git fetch --update-head-ok
14:37:14.585757 run-command.c:666       trace: run_command: GIT_DIR=.git git remote-http origin http://10.*.*.*:3000/****.git
14:37:14.620796 exec-cmd.c:237          trace: resolved executable dir: D:/Tools/Git/mingw64/libexec/git-core
14:37:14.624784 git.c:744               trace: exec: git-remote-http origin http://10.*.*.*:3000/****.git
14:37:14.624784 run-command.c:666       trace: run_command: git-remote-http origin http://10.*.*.*:3000/****.git
14:37:14.655766 exec-cmd.c:237          trace: resolved executable dir: D:/Tools/Git/mingw64/libexec/git-core
14:37:14.677887 run-command.c:666       trace: run_command: 'git credential-manager-core get'
14:37:14.770792 exec-cmd.c:237          trace: resolved executable dir: D:/Tools/Git/mingw64/libexec/git-core
14:37:14.775788 git.c:744               trace: exec: git-credential-manager-core get
14:37:14.775788 run-command.c:666       trace: run_command: git-credential-manager-core get
14:37:14.964834 ...\Application.cs:95   trace: [RunInternalAsync] Version: 2.0.567.18224
14:37:14.966842 ...\Application.cs:96   trace: [RunInternalAsync] Runtime: .NET Framework 4.0.30319.42000
14:37:14.966842 ...\Application.cs:97   trace: [RunInternalAsync] Platform: Windows (x86-64)
14:37:14.967833 ...\Application.cs:98   trace: [RunInternalAsync] OSVersion: 10.0 (build 19043)
14:37:14.967833 ...\Application.cs:99   trace: [RunInternalAsync] AppPath: D:\Tools\Git\mingw64\libexec\git-core\git-credential-manager-core.exe
14:37:14.967833 ...\Application.cs:100  trace: [RunInternalAsync] Arguments: get
14:37:15.025172 ...GitCommandBase.cs:33 trace: [ExecuteAsync] Start 'get' command...
14:37:15.036152 ...GitCommandBase.cs:47 trace: [ExecuteAsync] Detecting host provider for input:
14:37:15.037151 ...GitCommandBase.cs:48 trace: [ExecuteAsync]   protocol=http
14:37:15.037151 ...GitCommandBase.cs:48 trace: [ExecuteAsync]   host=10.*.*.*:3000
14:37:15.207109 ...viderRegistry.cs:147 trace: [GetProviderAsync] Performing auto-detection of host provider.
14:37:15.288052 ...viderRegistry.cs:152 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms.
14:37:15.291050 ...viderRegistry.cs:160 trace: [GetProviderAsync] Checking against 3 host providers registered with priority 'Normal'.
14:37:15.292050 ...viderRegistry.cs:175 trace: [GetProviderAsync] Querying remote URL for host provider auto-detection.
info: detecting host provider for 'http://10.*.*.*:3000/'...
14:37:15.294049 ...pClientFactory.cs:58 trace: [CreateClient] Creating new HTTP client instance...
14:37:15.717955 ...etHostProvider.cs:70 trace: [IsSupported] Host isn't supported as Bitbucket
14:37:15.717955 ...viderRegistry.cs:160 trace: [GetProviderAsync] Checking against 1 host providers registered with priority 'Low'.
14:37:15.718936 ...GitCommandBase.cs:50 trace: [ExecuteAsync] Host provider 'Generic' was selected.
14:37:15.721947 ...\HostProvider.cs:126 trace: [GetCredentialAsync] Looking for existing credential in store with service=http://10.*.*.*:3000 account=...
14:37:15.885853 ...\HostProvider.cs:140 trace: [GetCredentialAsync] Existing credential found.
14:37:15.885853 ...GitCommandBase.cs:54 trace: [ExecuteAsync] End 'get' command...
14:37:15.958029 run-command.c:666       trace: run_command: 'git credential-manager-core store'
14:37:16.054182 exec-cmd.c:237          trace: resolved executable dir: D:/Tools/Git/mingw64/libexec/git-core
14:37:16.059179 git.c:744               trace: exec: git-credential-manager-core store
14:37:16.059179 run-command.c:666       trace: run_command: git-credential-manager-core store
14:37:16.253049 ...\Application.cs:95   trace: [RunInternalAsync] Version: 2.0.567.18224
14:37:16.256047 ...\Application.cs:96   trace: [RunInternalAsync] Runtime: .NET Framework 4.0.30319.42000
14:37:16.256047 ...\Application.cs:97   trace: [RunInternalAsync] Platform: Windows (x86-64)
14:37:16.256047 ...\Application.cs:98   trace: [RunInternalAsync] OSVersion: 10.0 (build 19043)
14:37:16.256047 ...\Application.cs:99   trace: [RunInternalAsync] AppPath: D:\Tools\Git\mingw64\libexec\git-core\git-credential-manager-core.exe
14:37:16.257047 ...\Application.cs:100  trace: [RunInternalAsync] Arguments: store
14:37:16.314013 ...GitCommandBase.cs:33 trace: [ExecuteAsync] Start 'store' command...
14:37:16.324008 ...GitCommandBase.cs:47 trace: [ExecuteAsync] Detecting host provider for input:
14:37:16.325008 ...GitCommandBase.cs:48 trace: [ExecuteAsync]   protocol=http
14:37:16.326007 ...GitCommandBase.cs:48 trace: [ExecuteAsync]   host=10.*.*.*:3000
14:37:16.326007 ...GitCommandBase.cs:48 trace: [ExecuteAsync]   username=***
14:37:16.326007 ...GitCommandBase.cs:48 trace: [ExecuteAsync]   password=********
14:37:16.493911 ...viderRegistry.cs:147 trace: [GetProviderAsync] Performing auto-detection of host provider.
14:37:16.573865 ...viderRegistry.cs:152 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms.
14:37:16.575865 ...viderRegistry.cs:160 trace: [GetProviderAsync] Checking against 3 host providers registered with priority 'Normal'.
14:37:16.577863 ...viderRegistry.cs:175 trace: [GetProviderAsync] Querying remote URL for host provider auto-detection.
info: detecting host provider for 'http://10.*.*.*:3000/'...
14:37:16.578863 ...pClientFactory.cs:58 trace: [CreateClient] Creating new HTTP client instance...
14:37:16.987406 ...etHostProvider.cs:70 trace: [IsSupported] Host isn't supported as Bitbucket
14:37:16.987406 ...viderRegistry.cs:160 trace: [GetProviderAsync] Checking against 1 host providers registered with priority 'Low'.
14:37:16.987406 ...GitCommandBase.cs:50 trace: [ExecuteAsync] Host provider 'Generic' was selected.
14:37:16.988401 ...\HostProvider.cs:160 trace: [StoreCredentialAsync] Storing credential with service=http://10.*.*.*:3000 account=***...
14:37:17.154340 ...\HostProvider.cs:162 trace: [StoreCredentialAsync] Credential was successfully stored.
14:37:17.155342 ...GitCommandBase.cs:54 trace: [ExecuteAsync] End 'store' command...
14:37:17.176456 run-command.c:666       trace: run_command: 'git credential-manager store'
14:37:17.268409 exec-cmd.c:237          trace: resolved executable dir: D:/Tools/Git/mingw64/libexec/git-core
14:37:17.273388 git.c:744               trace: exec: git-credential-manager store
14:37:17.273388 run-command.c:666       trace: run_command: git-credential-manager store
git: 'credential-manager' is not a git command. See 'git --help'.

The most similar command is
        credential-manager-core
14:37:17.378327 run-command.c:666       trace: run_command: git rev-list --objects --stdin --not --all --quiet --alternate-refs
14:37:17.427300 run-command.c:666       trace: run_command: git rev-list --objects --stdin --not --all --quiet --alternate-refs
14:37:17.458291 exec-cmd.c:237          trace: resolved executable dir: D:/Tools/Git/mingw64/libexec/git-core
14:37:17.464278 git.c:455               trace: built-in: git rev-list --objects --stdin --not --all --quiet --alternate-refs
14:37:17.484267 run-command.c:1625      run_processes_parallel: preparing to run up to 1 tasks
14:37:17.484267 run-command.c:1657      run_processes_parallel: done
14:37:17.484267 run-command.c:666       trace: run_command: git maintenance run --auto --no-quiet
14:37:17.518248 exec-cmd.c:237          trace: resolved executable dir: D:/Tools/Git/mingw64/libexec/git-core
14:37:17.523245 git.c:455               trace: built-in: git maintenance run --auto --no-quiet
14:37:17.533239 run-command.c:666       trace: run_command: git merge FETCH_HEAD
14:37:17.566220 exec-cmd.c:237          trace: resolved executable dir: D:/Tools/Git/mingw64/libexec/git-core
14:37:17.572217 git.c:455               trace: built-in: git merge FETCH_HEAD
Already up to date.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

CMD

git push
git fetch
git push
or any other cmd need auth
  • What did you expect to occur after running these commands?

It should success with no warn. detecting host provider will not be shown as 2.33.0 does.

  • What actually happened instead?
    It success with an warn
>git push

info: detecting host provider for 'http://10.*.*.*:3000/'...
info: detecting host provider for 'http://10.*.*.*:3000/'...
git: 'credential-manager' is not a git command. See 'git --help'.

The most similar command is
        credential-manager-core
Everything up-to-date
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

An private local repo with auth created by Gogs.

@yyjdelete yyjdelete changed the title v2.33.1: git: 'credential-manager' is not a git command. See 'git --help'. v2.33.1: git: 'credential-manager' is not a git command. is still shown with credential.helper=manager-core Oct 18, 2021
@rimrul
Copy link
Member

rimrul commented Oct 18, 2021

Sounds like you have git configured to use multiple credential helpers. You might want to remove the old entries.

@rimrul
Copy link
Member

rimrul commented Oct 18, 2021

git config --show-origin --get-all credential.helper should show you where those entries come from.

@yyjdelete
Copy link
Author

Yes, thank you. You are right, I set it more than once by mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants