0

在任何 git 命令(git fetch例如)上,操作在git-credential-manager get或期间挂起git-credential-manager store

我们在工作中使用本地托管的 gitlab,我的同事都没有同样的问题。

我也使用 SourceTree (v. 3.3.7.3839) 但它设置为使用系统 git (v. 2.25.0),不可移植。适用于 Windows 的 GCM 是 v. 1.20.0。

开始滞后后更新/重新安装所有内容。

这是我的配置(我用 *** 替换了凭据):

[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

并追踪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

进行 2 分钟的 fetch 是疯狂的。

git-credential-manager store由于某种原因,它也做了3 次。

我尝试使用git config --global credential.writelog true命令启用日志记录,但credential.log创建的文件为空。

我怎样才能获得更多的日志记录/跟踪?

有什么可以解决这个延迟的吗?

4

0 回答 0