0

On any git command (git fetch for example) operation hangs during git-credential-manager get or git-credential-manager store.

We use local hosted gitlab at work and none of my coworkers have the same issue.

I also use SourceTree (v. 3.3.7.3839) but it is set to use system git (v. 2.25.0), not portable. GCM for Windows is v. 1.20.0.

Updated/reinstalled everything after it started lagging.

Here's my config (I replaced creds with ***):

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "origin"]
    url = https://gitlab.***.***/***/***.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[gui]
    wmstate = normal
    geometry = 893x710+52+52 175 196
[credential]
    helper = manager
    modalprompt = true

And trace for git fetch:

$ GIT_TRACE=1 GCM_TRACE=1 git fetch
16:56:14.897799 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
16:56:14.899793 git.c:439               trace: built-in: git fetch
16:56:14.905778 run-command.c:662       trace: run_command: GIT_DIR=.git git remote-https origin https://***.git
16:56:14.914782 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
16:56:14.917096 git.c:703               trace: exec: git-remote-https origin https://***.git
16:56:14.917096 run-command.c:662       trace: run_command: git-remote-https origin https://***.git
16:56:14.927068 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
16:56:14.978904 run-command.c:662       trace: run_command: 'git credential-manager get'
16:56:15.012718 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
16:56:15.013991 git.c:703               trace: exec: git-credential-manager get
16:56:15.013991 run-command.c:662       trace: run_command: git-credential-manager get
16:56:39.062612 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.20.0) 'get'
16:56:39.130899 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
16:56:39.135885 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 48 entries.
16:56:39.139874 ...\Common.cs:505       trace: [LoadOperationArguments] writeLog = 'False'.
16:56:39.139874 ...\Common.cs:513       trace: [LoadOperationArguments] modalPrompt = 'True'.
16:56:41.584455 ...\Common.cs:85        trace: [CreateAuthentication] detecting authority type for 'https://gitlab.***.com/'.
16:56:41.597420 ...\Common.cs:224       trace: [CreateAuthentication] authority for 'https://gitlab.***.com/' is basic with NTLM=Auto.
16:56:41.598418 ...\Common.cs:765       trace: [QueryCredentials] querying 'Auto' for credentials.
16:56:41.750016 ...uthentication.cs:129 trace: [AcquireCredentials] prompting user for credentials for 'https://gitlab.***.com/'.
16:56:52.570328 ...\Dialog.cs:103       trace: [DisplayModal] successfully acquired credentials from user.
16:56:52.577308 ...\Common.cs:780       trace: [QueryCredentials] credentials found.
16:56:53.405725 run-command.c:662       trace: run_command: 'git credential-manager store'
16:56:53.472541 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
16:56:53.474507 git.c:703               trace: exec: git-credential-manager store
16:56:53.474507 run-command.c:662       trace: run_command: git-credential-manager store
16:57:15.313166 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.20.0) 'store'
16:57:15.378962 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
16:57:15.383948 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 48 entries.
16:57:15.387948 ...\Common.cs:505       trace: [LoadOperationArguments] writeLog = 'False'.
16:57:15.388938 ...\Common.cs:513       trace: [LoadOperationArguments] modalPrompt = 'True'.
16:57:15.421882 ...\Common.cs:85        trace: [CreateAuthentication] detecting authority type for 'https://***/'.
16:57:17.325791 ...\Common.cs:224       trace: [CreateAuthentication] authority for 'https://***/' is basic with NTLM=Auto.
16:57:17.325791 ...\Program.cs:513      trace: [Store] storing basic credentials for 'https://***/'.
16:57:17.363721 run-command.c:662       trace: run_command: 'git credential-manager store'
16:57:17.398633 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
16:57:17.400655 git.c:703               trace: exec: git-credential-manager store
16:57:17.400655 run-command.c:662       trace: run_command: git-credential-manager store
16:57:39.114628 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.20.0) 'store'
16:57:39.182417 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
16:57:39.188400 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 48 entries.
16:57:39.192391 ...\Common.cs:505       trace: [LoadOperationArguments] writeLog = 'False'.
16:57:39.192391 ...\Common.cs:513       trace: [LoadOperationArguments] modalPrompt = 'True'.
16:57:39.234474 ...\Common.cs:85        trace: [CreateAuthentication] detecting authority type for 'https://***/'.
16:57:41.564216 ...\Common.cs:224       trace: [CreateAuthentication] authority for 'https://***/' is basic with NTLM=Auto.
16:57:41.564216 ...\Program.cs:513      trace: [Store] storing basic credentials for 'https://***/'.
16:57:41.608098 run-command.c:662       trace: run_command: 'git credential-manager store'
16:57:41.654977 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
16:57:41.656971 git.c:703               trace: exec: git-credential-manager store
16:57:41.656971 run-command.c:662       trace: run_command: git-credential-manager store
16:58:04.048814 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.20.0) 'store'
16:58:04.125080 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
16:58:04.132060 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 48 entries.
16:58:04.136051 ...\Common.cs:505       trace: [LoadOperationArguments] writeLog = 'False'.
16:58:04.136051 ...\Common.cs:513       trace: [LoadOperationArguments] modalPrompt = 'True'.
16:58:04.170981 ...\Common.cs:85        trace: [CreateAuthentication] detecting authority type for 'https://***/'.
16:58:06.100818 ...\Common.cs:224       trace: [CreateAuthentication] authority for 'https://***/' is basic with NTLM=Auto.
16:58:06.101816 ...\Program.cs:513      trace: [Store] storing basic credentials for 'https://***/'.
16:58:06.141704 run-command.c:662       trace: run_command: git rev-list --objects --stdin --not --all --quiet --alternate-refs
16:58:06.167883 run-command.c:662       trace: run_command: git rev-list --objects --stdin --not --all --quiet --alternate-refs
16:58:06.176860 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
16:58:06.178825 git.c:439               trace: built-in: git rev-list --objects --stdin --not --all --quiet --alternate-refs
16:58:06.201759 run-command.c:1615      run_processes_parallel: preparing to run up to 1 tasks
16:58:06.201759 run-command.c:1647      run_processes_parallel: done
16:58:06.202757 run-command.c:662       trace: run_command: git gc --auto
16:58:06.211731 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
16:58:06.213726 git.c:439               trace: built-in: git gc --auto

Doing fetch for 2 minutes is insane.

Also it does git-credential-manager store 3 times for some reason.

I have tried to enable logging with git config --global credential.writelog true command but credential.log file that gets created is empty.

How can I get more logging/tracing on this?

Is there anything to fix this delay?

Ivan Maslov
  • 168
  • 2
  • 13
  • 1
    Not a solution for the specific problem (I have no idea why the credential manager is being so slow, but it's probably a Windows thing and I don't use Windows) but consider using ssh authentication instead. That won't *need* to use the credential manager. – torek Feb 10 '20 at 16:44
  • @torek I tried to change it on my side but it seems like our repo doesn't support ssh auth but I didn't research – Ivan Maslov Feb 19 '20 at 13:18
  • I ended up just reinstalling windows and setting up from scratch, it doesn't lag anymore – Ivan Maslov Feb 19 '20 at 13:20
  • See https://stackoverflow.com/a/71721902/6309. – VonC Apr 02 '22 at 23:34

0 Answers0