【问题标题】:Pushing to private NuGet repository from Linux with SSL使用 SSL 从 Linux 推送到私有 NuGet 存储库
【发布时间】:2017-06-29 02:29:08
【问题描述】:

我目前正在尝试从 Linux 构建机器(dotnet 核心项目)将 NuGet 包部署到我们的本地 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-certificates)
  • 使用 certmgr 安装证书

还有其他我错过的方法,或者这是在 Linux 中使用 NuGet 的一个已知问题。 (我正在使用 docker 容器,所以不希望解决方案是“使用 windows”!)这是我们自动构建系统的一部分,所以我仅限于 Linux docker 容器。

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

【问题讨论】:

  • 你试过mozroots --import --sync吗?
  • 还要检查ca-certificates 包。如果您使用的是最新的 .NET Core CLI (1.0.0-rc4),则可以改用 dotnet nuget pushnuget push 是 NuGet 的第三方实现,由 Mono 提供。 dotnet nuget push官方,由微软创建。
  • 感谢您的指点。原来我试图使用域控制器的证书,而不是 CA 证书。呃! :)

标签: linux ssl nuget .net-core nexus


【解决方案1】:

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

问题似乎是 Nuget,在 Mono 下,is broken

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

【讨论】:

    猜你喜欢
    • 2018-10-24
    • 1970-01-01
    • 1970-01-01
    • 2018-05-02
    • 1970-01-01
    • 2019-08-30
    • 1970-01-01
    • 2020-10-25
    • 1970-01-01
    相关资源
    最近更新 更多