Linux 上的 NuGet:获取响应流时出错 [英] NuGet on Linux: Error getting response stream

查看:12
本文介绍了Linux 上的 NuGet:获取响应流时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

我收集到,该错误是由于某些证书(最有可能是 nuget.org 证书)不受信任所致.这篇博文有更多详细信息.

The error is due to some certificate (the nuget.org one most likely) not being trusted, I gather. This 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(尽管我一开始使用的一些旧版本也无法正常工作).

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?

推荐答案

我能够通过将证书导入机器存储而不是用户存储(这是默认设置)来实现这一点:

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

我在执行此操作之前验证了这一点——即使在完成了基于用户存储的原始命令之后——tlstest.exe 工具 失败,导入机库后成功.

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.

当然,对我来说最重要的是,nuget 也从那时开始工作.:)

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

这篇关于Linux 上的 NuGet:获取响应流时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆