我正在尝试在 Linux (Ubuntu 12) 上运行 NuGet。我有 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(尽管我一开始使用的一些旧版本也无法正常工作)。
我该如何解决这个错误?
最佳答案
我能够通过将证书导入机器存储而不是用户存储(这是默认设置)来完成这项工作:
$ 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 也从那时开始工作。 :)
关于linux - Linux 上的 NuGet : Error getting response stream,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15181888/