使用Visual Studio 2015的TFS git clone提供401未经授权的错误 [英] TFS git clone using Visual Studio 2015 gives 401 unauthorized error

查看:203
本文介绍了使用Visual Studio 2015的TFS git clone提供401未经授权的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处存在相同问题:

但是该解决方案对我不起作用.请阅读完整的问题.

But that solution doesn't work for me. Please read the full question.

当我尝试克隆TFS git存储库时收到以下错误:

I received the following error when I tried to clone TFS git repository:

Error encountered while cloning: An error occurred while sending the
request.

Inner Exception:
    The remote server returned an error: (401) Unauthorized.

    Inner Exception:
        No credentials are available in the security package

我没有找到其他日志详细信息.

I did not find any other log details.

我确认我可以在网络上访问TFS存储库.我也可以使用 Git bash 进行克隆.因此,Visual Studio存储我的凭据似乎是一个问题.

I verified that I am able to access TFS repository on the web. I can also clone using Git bash. So it seems to be a problem with Visual Studio storing my credentials.

按照提到的解决方案

as per the solution mentioned here, I don't want to delete all credentials for different TFS servers I am connected to.

  1. 我有 https://tfs.CodePlex.com/tfs TFS凭证
  2. 我有我的个人 https://myAccountName.VisualStudio.com 凭据和
  3. 我现在已连接到公司的tfs http://ipAddress:8080/tfs 凭据
  4. >
  1. I have https://tfs.CodePlex.com/tfs TFS credentials
  2. I have my personal https://myAccountName.VisualStudio.com credentials and
  3. I am now connected to my company's tfs http://ipAddress:8080/tfs credentials

前两个很好用,我可以随时从 Team Explorer 切换到那些帐户,但是第三个不起作用.

First two works fine, I can any time switch to those accounts from Team Explorer but the 3rd one is not working.

不确定,如何解决

推荐答案

最后,这就是我解决问题的方式

Finally this is how I resolved the issue

  1. TFS站点仅使用 NTML 身份验证,我在其顶部添加了 Negotiate (协商),并删除了匿名访问.
  2. 第二个问题是我无法通过域名访问TFS站点,只能通过IP地址访问.为了启用域名访问而不是IP地址,我为" DisableStrictNameChecking "和" DisableLoopbackCheck "添加了注册表项.
  1. TFS site was using only NTML authentication I added Negotiate on top it and removed anonymous access.
  2. I had a second issue not able to access the TFS site via domain name and was only accessble via IP address. To enable domain name access instead of IP address, I added registry keys for "DisableStrictNameChecking" and "DisableLoopbackCheck".

这篇关于使用Visual Studio 2015的TFS git clone提供401未经授权的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆