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

fri*_*ism 52 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
Run Code Online (Sandbox Code Playgroud)

我收集的错误是由于某些证书(最有可能是nuget.org)不可信任.这篇博文有更多细节.

所以我跑了:

$ mozroots --import --sync
$ certmgr -ssl https://go.microsoft.com
$ certmgr -ssl https://nugetgallery.blob.core.windows.net
$ certmgr -ssl https://nuget.org
Run Code Online (Sandbox Code Playgroud)

......无济于事

NuGet版本是2.3.0.0(尽管我开始使用的某些旧版本也没有用).

我该如何解决这个错误?

Aar*_*rch 112

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

$ 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
Run Code Online (Sandbox Code Playgroud)

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

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

  • 我尝试了其他一切.这100%工作.谢谢 (4认同)
  • 运行最后一个命令时,输出结束于:"***警告:证书签名是无效的***将此证书导入CA存储?".这是正常的吗?这有点吓人. (3认同)