Error in Visual Studio 2010 nuget: The underlying connection was closed: Failed to establish trust for the SSL / TLS secure channel

Whenever I try to install something or even just list packages, I get this error. "The main connection was closed: Failed to establish trust for the SSL / TLS secure channel"

I tried this solution from Codeplex with no luck.

I am using the latest version of Nuget .

I also tried various parameters in the devenv.exe.config file as follows:

<servicePointManager checkCertificateName="false" checkCertificateRevocationList="false"/> 
+47
web-config visual-studio-2010 nuget
Jan 23 '12 at 13:37
source share
9 answers
  • Go to VS2010 β†’ Tools β†’ Library Package Manager β†’ Package Manager Settings.

  • Choose Package Manager β†’ Package Sources.

  • Add a new package source as:

  • Move the newly added package source to the first position.

  • Discard existing "official Nuget package source"

  • Restart VS2010.

+82
Feb 27 2018-12-12T00:
source share

Go to https://nuget.org/ and get his certificate.

For example, if you use Firefox: after opening the desired site, click the site icon on the left side of the address bar, click "Additional Information", and on the "Security" tab there should be a "Website Identification" section with the "View Certificate" button. Click there, in the dialog that opens, select the "Details" tab - there you will see the chain for * .nuget.org. Click the "Export" button below and save the certificate to a file (add the .cer extension manually, because the dialog will not do this for you).

Now you need to configure the system so that it trusts the certificate. Press Win + R (the launch dialog will open) β†’ enter mmc and run it (with administrator privileges if you enabled UAC). There, select File β†’ Add or remove snapin ... β†’ select Certificates on the left, in the dialog box, select Computer account and Local computer . Click OK - the tree will have a Certificates node in the Console root . Open it and the folder with the Trusted People file. In the context menu, select All Tasks β†’ Import ... β†’ Select the file that you exported earlier and import it.

Everything should work fine.

+10
Dec 6 '12 at 15:33
source share

We had the same problem at work, and we solved this by resetting the secure socket, Https β†’ http . This means that you can use the V2 URL http://nuget.org/api/v2/ .

The problem might get rid of the secure socket, but the above URL ( http://packages.nuget.org/v1/FeedService.svc/ ) is also unsafe.

+9
Jul 22 '13 at 15:12
source share

There seems to be a problem with the SSL certificate on go.microsoft.com. Change the package source URL to http://packages.nuget.org/v1/FeedService.svc/ and it should work fine.

+8
Jun 01 2018-12-12T00:
source share

Related: ServicePointManager does not support proxies using the https scheme

If you previously opened Fiddler, you may have a certificate for nuget.org that is not valid.

If so, open MMC, add snapin certificates (current user), and remove nuget.org from your personal repository.

Example certificate to remove

Due to the fact that Nuget maintains the handle of this certificate (apparently), you will have to restart Visual Studio. Afterwards you should have a good time.

+6
May 7 '14 at 10:19
source share

Go to VS2012 β†’ Tools β†’ Library Package Manager β†’ Package Manager Settings Select β€œPackage Manager” β†’ β€œPackage Sources”.

It works on my machine.

+4
Jul 22 '14 at 7:07
source share

As of January 21, 2015, the correct URL is https://www.nuget.org/api/v2/ . WWW or certificate failure required. DO NOT go back to http because you open your code and all its consumers to the nasty MITM vector.

+2
Jan 21 '15 at 22:00
source share

I could solve this problem by resetting the secure socket, https -> http . Go to Tools -> Nuget Package Manager -> Package Sources , then add a new source, but without https :

This means http://nuget.org/api/v2/ .

0
Aug 18 '15 at 15:30
source share

I had to remove https in the local computer settings for Nuget and add (http) it to the user level in Tools β†’ Manager Package Manager β†’ Package Manager Settings. Choose Package Manager β†’ Package Sources.

0
Sep 29 '15 at 16:23
source share



All Articles