Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NuGet on Linux: Error getting response stream

Tags:

linux

nuget

mono

I'm trying to run NuGet on Linux (Ubuntu 12). I have Mono 3.0.6 (compiled from source).

$ mono --runtime=v4.0.30319 .nuget/NuGet.exe update -self Checking for updates from https://nuget.org/api/v2/. Error getting response stream (Write: The authentication or decryption has failed.): SendFailure 

The error is due to some certificate (the nuget.org one most likely) not being trusted, I gather. This blog post has more details.

So I've run:

$ mozroots --import --sync $ certmgr -ssl https://go.microsoft.com $ certmgr -ssl https://nugetgallery.blob.core.windows.net $ certmgr -ssl https://nuget.org 

... to no avail.

NuGet Version is 2.3.0.0 (although I started out with some older version that also did not work either).

How can I fix this error?

like image 431
friism Avatar asked Mar 03 '13 02:03

friism


People also ask

Does NuGet work on Linux?

The nuget.exe CLI, nuget.exe , is the command-line utility for Windows that provides all NuGet capabilities; it can also be run on Mac OSX and Linux using Mono with some limitations. To learn how to use basic commands with the nuget.exe CLI, see Install and use packages using the nuget.exe CLI.

Is API NuGet org down?

All systems are operational. Last checked in 2 hours.


1 Answers

I was able to get this working by importing the certificates into the machine store and not the user store, which is the default:

$ sudo mozroots --import --machine --sync $ sudo certmgr -ssl -m https://go.microsoft.com $ sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net $ sudo certmgr -ssl -m https://nuget.org 

I verified that before I did this — even after having done the original user store-based commands — the tlstest.exe tool failed, and after importing into the machine store it succeeded.

And, most important to me of course, nuget started working then too. :)

like image 100
Aaron Lerch Avatar answered Sep 22 '22 08:09

Aaron Lerch