Warm tip: This article is reproduced from serverfault.com, please click

windows-git clone:身份验证失败

(windows - git clone: Authentication failed for )

发布于 2018-07-19 13:33:55

尝试访问私有公司tfs。他们通过授予Windows用户(domain \ login)适当的权限来授予我访问权限。

我可以访问tfs的Web界面,浏览存储库和其他东西。

但是当我尝试跑步时

 git clone https://tfs.somehostname.com/tfs/somefolder/_git/therepository

它失败了

Cloning into 'therepository'...

fatal: Authentication failed for 'https://tfs.somehostname.com/tfs/somefolder/_git/therepository/'

尝试使用没有公司网络资料的家用PC-同样的错误。

在PowerShell,Git Bash,通过VisualStudio克隆中进行了尝试-相同的错误。

SSH已关闭(使请求超时)。

Web和Git都要求一次提供凭据(尝试在凭据管理器中删除-再次请求,提交网络正常后,git失败)

公司帮手想提供帮助,但他所提供的只是tfs日志。他说,我的用户名不附带请求(通过将我的尝试时间戳与日志同步进行跟踪)。

2018-07-19 07:04:00 SOMEIP GET /tfs/SOMEFOLDER/_git/REPOSITORY/info/refs service=git-upload-pack 443 - ANOTHERIP git/2.12.2+(Microsoft+Windows+NT+6.3.9600.0;+Win32NT+x64)+CLR/4.0.30319+VS15/15.0.0 - 401 2 5 62
2018-07-19 07:23:00 SOMEIP GET /tfs/SOMEFOLDER/_git/REPOSITORY/info/refs service=git-upload-pack 443 - ANOTHERIP git/2.18.0.windows.1 - 401 2 5 62
2018-07-19 07:23:00 SOMEIP GET /tfs/SOMEFOLDER/_git/REPOSITORY/info/refs service=git-upload-pack 443 - ANOTHERIP git/2.18.0.windows.1 - 401 1 3221225581 187

而其他人包括它

2018-07-19 05:44:27 SOMEIP GET /tfs/SOMEFOLDER/_git/REPOSITORY/info/refs service=git-upload-pack 443 DOMAIN\LOGIN ANOTHERIP git/2.12.2+(Microsoft+Windows+NT+6.1.7601+Service+Pack+1;+Win32NT+x64)+CLR/4.0.30319+VS15/15.0.0 - 200 0 0 265
Questioner
SLCH000
Viewed
0
SLCH000 2018-07-20 14:49:49

罪魁祸首是俄罗斯帐户密码。

意外设置(错误的键盘布局)。一切正常,所以没有费心更改它。

出于绝望,现在改变了它,它奏效了。

如果有人在查找此线程而不是它为你提供解决方案,请查看我所描述的问题和步骤下的注释,它们可能对你有用。