首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用凭据管理器的Git身份验证失败

使用凭据管理器的Git身份验证失败
EN

Stack Overflow用户
提问于 2019-02-28 01:02:33
回答 1查看 507关注 0票数 0

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

代码语言:javascript
复制
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“命令成功地报告身份验证错误

代码语言:javascript
复制
fatal: Authentication failed for 'https://tfs...

下面是GCM的日志:

代码语言:javascript
复制
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.

知道是怎么回事吗?

谢谢

EN

回答 1

Stack Overflow用户

发布于 2019-03-14 21:16:48

代码语言:javascript
复制
[http]
    emptyauth = true

解决了问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54910804

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档