在尝试连接到Nuget时,我得到了下面的错误,然后我无法连接:
无法加载源的服务索引 https://api.nuget.org/v3/index.json。 发送请求时发生错误。 无法连接到远程服务器 连接尝试失败,原因是被连接方在一段时间后没有正确响应,或已建立连接 由于连接的主机未能响应68.232.34.200:443而失败
我可以在浏览器上访问https://api.nuget.org/v3/index.json。
在尝试连接到Nuget时,我得到了下面的错误,然后我无法连接:
无法加载源的服务索引 https://api.nuget.org/v3/index.json。 发送请求时发生错误。 无法连接到远程服务器 连接尝试失败,原因是被连接方在一段时间后没有正确响应,或已建立连接 由于连接的主机未能响应68.232.34.200:443而失败
我可以在浏览器上访问https://api.nuget.org/v3/index.json。
当前回答
值得注意的是,.net核心SSL身份验证存在一个可能导致这种情况的错误。禁用他们最新的网络堆栈实现,为我解决了这个问题。
你可以永久地设置它,或者使用以下命令启动你的应用程序:
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 dotnet ...
其他回答
I had the same error message while scaffolding Identity to my ASP.NET Core MVC project. Since my connection was not behind a proxy, removing/editing proxy configurations didn't make sense. And I didn't want to delete a file or uninstall PMC either. While looking around I realized a "Clear All Nuget Cache(s)" button on Tools --> Options --> NuGet Package Manager --> General. After pressing the button I had to wait for some time for the operation to complete. After that I tried to scaffold the Identity again but it didn't work. Then I decided to restart VS and voila :)
为了支持@Eddie Chen提供的答案(这里),我不得不将http_proxy设置添加到以下文件中:
C: \ Windows \ system32 \漫游配置systemprofile \ AppData \ \鸡块鸡块。配置
<add key="http_proxy" value="http://your_proxy_url:8080" />
似乎Nuget仍然使用代理脚本地址(对于我们的VPN),即使代理设置被禁用。我删除了脚本地址,它工作。
我有这个错误,然后我意识到我是用我的个人微软帐户而不是我的工作帐户登录的。
希望这能有所帮助。
我有一对Windows 2016服务器,其中Visual Studio无法连接到NuGet。在尝试了几乎所有其他建议的修复(注册表更改,Visual Studio/NuGet相关的缓存清理或文件/配置更改)后,以下是我们解决它的方法。
我们有一个组策略(GPO),设置了密码,我将这些密码添加到我们的GPO密码列表中,以使其工作。
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
https://github.com/NuGet/Announcements/issues/60