使用VS 2015 Update 3克隆远程存储库时遇到错误(TFS 2015 Update 3) [英] Error encountered while cloning the remote repository with VS 2015 Update 3 (TFS 2015 Update 3)

查看:1207
本文介绍了使用VS 2015 Update 3克隆远程存储库时遇到错误(TFS 2015 Update 3)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级到客户端的VS 2015(更新3)和服务器端的TFS 2015(更新3)。 Git操作工作了一段时间,然后在尝试克隆git repo时开始出现以下错误:

 克隆时遇到的错误远程存储库:发送请求时发生错误。 

内部异常:
远程服务器返回错误:(401)未经授权。

内部例外:
安全包中没有可用凭证



<但是我可以在浏览器中导航到回放而没有任何问题。然后,我想这可能是由于我的客户端设置。我尝试删除VS缓存以及TFS缓存。没有工作。当我使用Fiddler时,应该提供以下信息:

它显示以下信息:

 请求1:
GET https:// myhost / tfs / transact / Transact / _git / MY-REPO / info / refs?service = git-upload-pack HTTP / 1.1
User-代理:git / 1.0(libgit2)Team Foundation(devenv.exe,14.102.25521.0,Enterprise,SKU:37)
主机:myhost
接受编码:gzip
连接:Keep-Alive

响应1:
HTTP / 1.1 401未授权
...
请求2:
GET https:// myhost / tfs / transact / Transact / _git / MY-REPO / info / refs?service = git-upload-pack HTTP / 1.1
User-Agent:git / 1.0(libgit2)Team Foundation(devenv.exe,14.102.25521.0,Enterprise,SKU: 37)
接受编码:gzip
授权:NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAKAEM6AAAADw ==
主机:myhost

响应2:
HTTP / 1.1 401未授权

有了这些信息,我在我的visual studio文件夹中搜索了libgit2 *。*文件。我发现了LibGit2Sharp.dll的几个实例。它们都具有相同的版本(0.22.0.0),但一个实例的版本是14.0.25029.0。我试图在14.0.25029.0之上复制0.22.0.0版本。但视觉工作室在发布期间对此抱怨。在C:\程序文件(x86)\微软Visual Studio 14.0 \ Common7 \ IDE \ Extensions文件夹中找到带有14. *版本的文件夹,它包含几个以Microsoft.TeamFoundation开头的dll。 。所有这些dll的版本为:14.102.25521.0(这是我在小提琴跟踪中发现的)。



看起来我处于正确的问题区域,但不确定如何解决错误。



有什么想法?

解决方案

一个星期,我今天发布了这个问题。但在发布之后,我登陆了一个解决方案。



它与visual studio / tfs升级无关。我必须输入错误的tfs证书信息(同时检查记住我框)。记住我的功能,团队资源管理器从来没有给我一个机会来纠正凭据信息,并可能保留使用存储错误的凭据。以下是我必须解决的问题:


  1. 控制面板\用户帐户\Credential管理器

  2. 删除所有与tfs相关的凭证。

  3. 启动visual studio

  4. 它现在会提示您输入tfs证书信息。

问题解决了。

下面的文章(尽管是过时的)帮助我解决了这个问题:
https://blogs.msdn.microsoft.com/visualstudioalm/2012/08/29/clearing-the-credentials-for-connecting-to-a-team-foundation-server/


I have recently upgraded to VS 2015 (Update 3) on the client side and TFS 2015 (Update 3) on server side. The Git operations worked for a while, then I started getting following error when trying to clone a git repo:

Error encountered while cloning the remote repository: 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

But I can navigate to repo in the browser without any problems. Then, I figured this may due my client side settings. I tried removing the VS cache as well as TFS cache. Nothing worked. When I used Fiddler, it should following information:

It revealed following information:

Request 1:
GET https://myhost/tfs/transact/Transact/_git/MY-REPO/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.0 (libgit2) Team Foundation (devenv.exe, 14.102.25521.0, Enterprise, SKU:37)
Host: myhost
Accept-Encoding: gzip
Connection: Keep-Alive

Response 1:
HTTP/1.1 401 Unauthorized
...
Request 2:
GET https://myhost/tfs/transact/Transact/_git/MY-REPO/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.0 (libgit2) Team Foundation (devenv.exe, 14.102.25521.0, Enterprise, SKU:37)
Accept-Encoding: gzip
Authorization: NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAKAEM6AAAADw==
Host: myhost

Response 2:
HTTP/1.1 401 Unauthorized

With this information, I searched for libgit2*.* file in my visual studio folders. I found several instances of LibGit2Sharp.dll. All of them have same version (0.22.0.0) but one instance had the version 14.0.25029.0. I tried copy the version 0.22.0.0 over on top of 14.0.25029.0. But visual studio complained about it during launch. The folder with 14.* version is found in "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions" folder and it contains several dlls that start with "Microsoft.TeamFoundation.". All of those dlls have the version: 14.102.25521.0 (which is what I found in the fiddler trace).

Looks like I am at the right problem area but not sure how to fix the error.

Any ideas?

解决方案

After struggling with the above problem for a week, I posted the question today. But right after posting, I landed on a solution.

It has nothing to do with visual studio/tfs upgrade. I must have entered wrong tfs credential information (while checking remember me box). With remember me feature, the team explorer never gave me a chance to correct the credential information and probably kept using stored wrong credentials. Here is what I had to do to correct the issue:

  1. Control Panel\User Accounts\Credential Manager
  2. Remove any tfs related credentials.
  3. Launch visual studio
  4. It will now prompt you for tfs credential information.

Problem solved.

The following post (though dated) helped me in solving the problem: https://blogs.msdn.microsoft.com/visualstudioalm/2012/08/29/clearing-the-credentials-for-connecting-to-a-team-foundation-server/

这篇关于使用VS 2015 Update 3克隆远程存储库时遇到错误(TFS 2015 Update 3)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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