The underlying connection was closed: An unexpected error occurred on a send.— NuGet

后端 未结 5 1975
时光取名叫无心
时光取名叫无心 2021-02-19 19:40

Whilst trying to restore nuget packages I am getting the following:-

Error 1 The underlying connection was closed: An unexpected error occurred on a send.<

相关标签:
5条回答
  • 2021-02-19 20:16

    A quick fix for Visual Studio 2015 users is to change the URL from https to http. I have a feeling that this may not work if the package has a https license file.

    Alternatively, switch to Visual Studio 2013 for package installation and updates.

    0 讨论(0)
  • 2021-02-19 20:21

    I'm seeing this issue behind a corporate proxy using Visual Studio 2015 which utilizes the new v3 API (https://api.nuget.org/v3/index.json). In my instance, it has to do with an SSL intercepting corporate proxy (BlueCoat) that doesn't know how to handle a newer cipher protocol (eg: TLS 1.2 plus some newer key exchange cipher) being negotiated by that API endpoint I believe.

    0 讨论(0)
  • 2021-02-19 20:22

    Type this command

    On Linux Execute the following in the command line before executing the Git command:

    export GIT_TRACE_PACKET=1;export GIT_TRACE=1;export GIT_CURL_VERBOSE=1
    

    On Windows Execute the following in the command line before executing the Git command:

    set GIT_TRACE_PACKET=1 set GIT_TRACE=1 set GIT_CURL_VERBOSE=1
    
    0 讨论(0)
  • 2021-02-19 20:26

    Check if your internet connection is working and your proxy is setup and enabled in Internet Explorer LAN settings. In my case it was trying to download it from internet and failing, as my proxy was disabled! Hope this helps...

    0 讨论(0)
  • 2021-02-19 20:35

    I was having the same problem until I invoked my network admins. We found that our IPS flagged the domain as malware and we blocked it at our internal network level.

    Once we removed the block, everything is now working again.

    We also had problems getting images and css from codeplex project sites and this fixed that issue as well.

    0 讨论(0)
提交回复
热议问题