具有凭据管理器身份验证的Git失败

时间:2019-02-27 17:02:33

标签: git tfs windows-10 git-credential-manager

我生成了一个与Windows通用凭据和git凭据管理器一起使用的个人访问令牌。我在此配置中使用的是git 64位版本2.21.0.windows.1

GCM_AUTHORITY=NTLM
GCM_HTTP_TIMEOUT=100000
GCM_PRESERVE=true
GCM_TOKEN_DURATION=24
GCM_TRACE=C:\logs\git-cm.log
GCM_VALIDATE=false

但并非总是“ git clone”命令成功,但抱怨身份验证错误

fatal: Authentication failed for 'https://tfs...

以下是GCM的日志:

11:56:09.657834 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.18.4) 'get'
11:56:09.769222 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
11:56:09.778231 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 14 entries.
11:56:09.779232 ...\Common.cs:435       trace: [LoadOperationArguments] authority = 'NTLM'.
11:56:09.783270 ...\Common.cs:497       trace: [LoadOperationArguments] validate = 'False'.
11:56:09.783270 ...\Common.cs:521       trace: [LoadOperationArguments] preserve = 'True'.
11:56:09.784271 ...\Common.cs:596       trace: [LoadOperationArguments] tokenDuration = '24'.
11:56:09.784271 ...\Common.cs:691       trace: [LoadOperationArguments] httpTimeout = '100000'.
11:56:09.868367 ...\Common.cs:224       trace: [CreateAuthentication] authority for 'https://tfs.<<domain>>/' is basic with NTLM=Always.
11:56:09.870348 ...\Common.cs:765       trace: [QueryCredentials] querying 'Ntlm' for credentials.
11:56:09.870348 ...\Common.cs:915       trace: [QueryCredentials] 'https://tfs.<<domain>>/' is NTLM.
11:56:10.085193 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.18.4) 'erase'
11:56:10.185836 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
11:56:10.201430 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 14 entries.
11:56:10.202158 ...\Common.cs:435       trace: [LoadOperationArguments] authority = 'NTLM'.
11:56:10.206490 ...\Common.cs:497       trace: [LoadOperationArguments] validate = 'False'.
11:56:10.206490 ...\Common.cs:521       trace: [LoadOperationArguments] preserve = 'True'.
11:56:10.206490 ...\Common.cs:596       trace: [LoadOperationArguments] tokenDuration = '24'.
11:56:10.206490 ...\Common.cs:691       trace: [LoadOperationArguments] httpTimeout = '100000'.
11:56:10.237784 ...\Program.cs:369      trace: [Erase] preserve = true, canceling erase request.
11:56:10.411841 ...\Common.cs:744       trace: [Main] git-credential-manager (v1.18.4) 'erase'
11:56:10.528564 ...\Git\Where.cs:348    trace: [FindGitInstallations] found 1 Git installation(s).
11:56:10.528564 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 14 entries.
11:56:10.528564 ...\Common.cs:435       trace: [LoadOperationArguments] authority = 'NTLM'.
11:56:10.544186 ...\Common.cs:497       trace: [LoadOperationArguments] validate = 'False'.
11:56:10.544186 ...\Common.cs:521       trace: [LoadOperationArguments] preserve = 'True'.
11:56:10.544186 ...\Common.cs:596       trace: [LoadOperationArguments] tokenDuration = '24'.
11:56:10.544186 ...\Common.cs:691       trace: [LoadOperationArguments] httpTimeout = '100000'.
11:56:10.575440 ...\Program.cs:369      trace: [Erase] preserve = true, canceling erase request.

知道发生了什么吗?

谢谢

1 个答案:

答案 0 :(得分:0)

A, B, C, F, G

解决了问题