linux - Linux 上的 NuGet : Error getting response stream

标签 linux mono nuget

我正在尝试在 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/

相关文章:

linux - 如何设置父进程的工作目录?

linux - 从 txt 文件中删除第一行和 3 列

java - Linux下Java的虚拟内存使用率,使用的内存过多

c# - 使用 Fody 的 Mono 支持将 dll 嵌入到 exe 中

visual-studio - 如何修复 ChakraCore NuGet 包错误?

linux - 使用 Jenkins 进行 Selenium 测试

c# - 可以单声道运行 framework.net 编译的应用程序(来自 VS 环境)

linux - Monodevelop - 尝试在 linux Precise 64 (Ubuntu 12.04 LTS) 上安装

c# - 为什么我的repositoryPath 在 Azure DevOps/TFS 中被忽略?

nuget - 将文件从子文件夹复制到 nuspec 中的根目录