Linux上的NuGet:获取响应流时出错

时间:2013-03-03 02:41:58

标签: linux mono nuget

我正在尝试在Linux上运行NuGet(Ubuntu 12)。我有Mono 3.0.6(从源代码编译)。

$ 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

错误是由于某些证书(最有可能是nuget.org)不受信任,我收集。这blog post has more details

所以我跑了:

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

......无济于事。

NuGet版本是2.3.0.0(虽然我开始使用一些也不起作用的旧版本。)

如何解决此错误?

1 个答案:

答案 0 :(得分:111)

我能够通过将证书导入机器商店而不是用户商店来实现这一点,这是默认的:

$ 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

我在执行此操作之前验证过 - 即使在完成原始基于用户存储的命令后 - the tlstest.exe tool失败,并且在导入到计算机存储区后,它也成功了。

当然,对我来说最重要的是,nuget也开始工作了。 :)