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

查看:136
本文介绍了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).

如何解决此错误?

推荐答案

我能够通过将证书导入到计算机存储而不是用户存储中来进行此操作,这是默认设置:

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天全站免登陆