bash tfs 服务器上的身份验证失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41553671/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 15:36:03  来源:igfitidea点击:

Authentication failed on tfs server

gitbashvisual-studio-2015tfs

提问by Manny42

I am having a really weird issue with git bashon windows.

git bash在 Windows 上遇到了一个非常奇怪的问题。

When I am working in Visual Studio I have no problem working with my git repo stored in a tfs server. I just branched, committed and pushed.

当我在 Visual Studio 中工作时,使用存储在 tfs 服务器中的 git 存储库没有问题。我只是分支,承诺和推动。

But when I try to do the same (fetch, pull, push...) in my git bashI get a

但是当我尝试在我的文件中做同样的事情(获取、拉、推......)时,我git bash得到了一个

fatal: Authentication failed for 'https://tfs.xxxxxxxxxx.com/defaultcollection/_git/XXXXXXXXXXX/'

致命:“ https://tfs.xxxxxxxxxx.com/defaultcollection/_git/XXXXXXXXXXX/”的身份验证失败

I tried to delete the repo and clone it from bash, but get the same error. Deleted everything related to tfs in Web/Windows Credentials (Credential Manager) did not change anything. Also tried to use git config --global --unset credential.helper. Still no result.

我试图删除 repo 并从 bash 克隆它,但得到同样的错误。在 Web/Windows Credentials (Credential Manager) 中删除了与 tfs 相关的所有内容并没有改变任何东西。还尝试使用git config --global --unset credential.helper. 还是没有结果。

Has anyone got such a problem before?

有没有人遇到过这样的问题?

采纳答案by Cece Dong - MSFT

You need to set up authentication with credential managersor SSH.

您需要使用凭证管理器SSH设置身份验证。

Download and run the latest Git for Windows installer, which includes the Git Credential Manager for Windows. Make sure to leave the Git Credntial Manager installation option enabled when prompted.

下载并运行最新的 Git for Windows 安装程序,其中包括适用于 Windows 的 Git Credential Manager。确保在出现提示时启用 Git Credntial Manager 安装选项。

enter image description here

在此处输入图片说明

回答by user9664011

Go to Control Panel -> Credential Manager -> Windows Credentials (Generic Credentials).
If there is nothing that starts with git:http..., go and ADD generic credentials:

转到控制面板 -> 凭据管理器 -> Windows 凭据(通用凭据)
如果没有以git:http...开头的内容,请添加通用凭据:

enter image description here

在此处输入图片说明

回答by Dan H

I tried the accepted answer on this thread and it didn't work for me. This command is what fixed it for me.

我在这个线程上尝试了接受的答案,但它对我不起作用。这个命令是为我修复的。

git config --global credential.helper wincred

回答by M. hsin

Could you set GIT_CURL_VERBOSE=1 as env variable to get verbose fatal message for debug. Also you can remove the proxy configuration and try again.

您能否将 GIT_CURL_VERBOSE=1 设置为环境变量以获取详细的调试信息。您也可以删除代理配置并重试。