Visual Studio 2015的github扩展失去连接 [英] github extension for visual studio 2015 loses connection

查看:184
本文介绍了Visual Studio 2015的github扩展失去连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我偶尔会出现此错误.这确实很烦人,因为有时它会自行修复,但是大多数情况下,我只需要关闭VS并重新打开,然后它又会工作一段时间.

当我尝试从分支(或任何其他git网络交互)中提取时,就会发生这种情况.

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

Inner Exception:
    The remote name could not be resolved: 'github.com'

  1. 有时它会在一段未知的时间后自行修复.
  2. 有时我在那段时间不做任何事情.
  3. 有时我会四处查看并检查其他分支并执行拉取请求,然后它又可以正常工作.
  4. 大多数情况下,我必须重新启动VS才能使其重新工作.

还有其他人遇到过这个问题吗?您如何解决的?

我也在使用两因素身份验证.如果那是问题. (似乎不是问题)

有时在启动VS时也会收到此错误:

We were unable to automatically populate your Visual Studio Team Services accounts.

The following error was encountered: TF400813: 
    Resource not available for anonymous access. Client authentication required.

所以也许是在交互过程中的某个时刻丢失了github.com身份验证,然后重新启动VS对其进行了修复.

另一个提示是,当无法访问github.com时,无法在Visual Studio的浏览器中将其浏览到.可以在Chrome(或FireFox或IE)中浏览它. Visual Studio似乎偶尔也会失去与nuget.org的连接,效果似乎是相同的.

可能的相关问题: Visual Studio/C#:Nuget无法连接到远程服务器

更新:这种情况发生在两个不同的ISP上,并且其中一个不在公司防火墙上(这排除了网络问题).当问题发生时,它实际上关闭了Visual Studio内部的所有网络通信,因此,这不仅仅是github.com问题.我已经与Microsoft取得联系,希望我们能够解决该问题,并且可以为所有人发布答案.

解决方案

在Microsoft的支持下以及VS 2017的发布之后.

答案是升级!

I keep getting this error occasionally. It is really annoying because sometimes it fixes itself, but mostly I just have to close VS and reopen and then it will work again for a while.

It happens when I try to pull from a branch (or any other git network interaction).

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

Inner Exception:
    The remote name could not be resolved: 'github.com'

  1. Sometimes it fixes itself after an unknown period of time.
  2. Sometimes I do nothing during that period of time.
  3. Sometimes I click around and check out other branches and do pull requests and then it works again.
  4. Mostly I have to restart VS to get it working again.

Has anyone else had this issue? How did you resolve?

I am also using two factor auth. if that is the issue. (Doesn't appear to be the issue)

I also receive this error when starting up VS sometimes:

We were unable to automatically populate your Visual Studio Team Services accounts.

The following error was encountered: TF400813: 
    Resource not available for anonymous access. Client authentication required.

So perhaps it is that the github.com authentication is being lost at some point during interactions and restarting VS fixes it.

Another clue is that when github.com can't be reached, it can't be browsed to in the browser in Visual Studio. It can be browsed to fine in Chrome (or FireFox or IE). Visual Studio also seems to lose connection to nuget.org occasionally as well, the effect appears to be the same.

Possible related issue: Visual Studio/C#: Nuget Unable to connect to remote server

UPDATE: This happens on two different ISPs and one of them was not on the corporate firewall (this rules out network issues). When the issue happens it actually shuts down ALL network communication from within Visual Studio, so this isn't just a github.com issue. I have a ticket open with Microsoft, hopefully we will get it resolved and I can post the answer for everyone.

解决方案

After back and forth with Microsoft support and the release of VS 2017.

The answer is to upgrade!

这篇关于Visual Studio 2015的github扩展失去连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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