使用 SSL 从 Linux 推送到专用 NuGet 存储库



我目前正在尝试将NuGet包从Linux构建计算机(dotnet核心项目(部署到我们的本地Nexus服务器

但是,Nexus服务器在HTTPS上运行,具有公司域证书,我的构建机器无法识别该证书。

当我运行nuget push时,出现以下错误:

Pushing App.1.0.0.nupkg to 'https://v-nexus/repository/nuget/'...
  PUT https://v-nexus/repository/nuget/
An error was encountered when fetching 'PUT https://v-nexus/repository/nuget/'. The request will now be retried.
Error: TrustFailure (The authentication or decryption has failed.)
  The authentication or decryption has failed.
  Invalid certificate received from server. Error code: 0xffffffff800b010a
  PUT https://v-nexus/repository/nuget/
An error was encountered when fetching 'PUT https://v-nexus/repository/nuget/'. The request will now be retried.
Error: TrustFailure (The authentication or decryption has failed.)
  The authentication or decryption has failed.
  Invalid certificate received from server. Error code: 0xffffffff800b010a
  PUT https://v-nexus/repository/nuget/
Error: TrustFailure (The authentication or decryption has failed.)
  The authentication or decryption has failed.
  Invalid certificate received from server. Error code: 0xffffffff800b010a

我试过:

  • 全局安装服务器证书(使用 update-ca-certificate(
  • 使用 certmgr 安装证书

我是否错过了任何其他方法,或者这是在 Linux 中使用 NuGet 的已知问题。(我正在使用 docker 容器,所以不希望解决方案是"使用窗口"!这构成了我们自动化构建系统的一部分,所以我仅限于 Linux docker 容器。

我的一所大学,运行Windows能够毫无问题地推送包,所以我知道这不是服务器的问题。

这是一个非常古老的问题,但我遇到了它,寻找这个问题的答案。

问题似乎是Nuget,在Mono的领导下,被打破了。

这不是一个真正的答案,但希望它能帮助其他人。

最新更新