Nick
Nick

Reputation: 6608

nuget command line utility package restore with mono on ubuntu

I'm trying to restore packages with the nuget restore command using the nuget.exe command line utility.

I'm on Ubuntu 14.04, and have just performed apt-get update.

Calling mono --version returns: Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1)

Here is my exact call and response:

$ mono nuget.exe restore
WARNING: The initialization function tries to access Value on this instance
WARNING: The initialization function tries to access Value on this instance
WARNING: The initialization function tries to access Value on this instance
WARNING: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure
Unable to find version '2.0.14' of package 'FSharp.Data'.
Unable to find version '1.3.0.1' of package 'FsUnit'.
Unable to find version '1.3.0.1' of package 'FsUnit.Sample'.
Unable to find version '2.6.3' of package 'NUnit'.

I have tried with and without a nuget.config file in the same folder.

What's going wrong and what can I do to solve?

Upvotes: 3

Views: 2602

Answers (1)

seyisulu
seyisulu

Reputation: 455

The problem you describe has to do with root security certificates.

Enter the following command in your terminal:

mozroots --import --sync

As per @ahri below, here is a more up-to-date answer:

mozroots --import --sync --url https://hg.mozilla.org/mozilla-central/raw-file/tip/security‌​/nss/lib/ckfw/builti‌​ns/certdata.txt

Source

Upvotes: 3

Related Questions