' dotnet还原'将私人nuget feed与公众混合时失败

发布于 2025-01-23 03:54:27 字数 820 浏览 1 评论 0原文

我的项目使用来自私人供稿的包裹(基于Jfrog)和公共供应包。

从骑手或VS等IDE恢复软件包工作正常,但是当我使用控制台时,它会在401授权错误中失败。

知道我该如何解决?

我的全局nuget.config文件:

<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="jfrog-based-nuget" value="https://myprivate.jfrog.io/artifactory/api/nuget/v3/myprivate-nuget" />
  </packageSources>
</configuration>

示例错误:

error : Failed to retrieve information about '<private-package-name>' from remote source '<private-feed>/FindPackagesById()?id='<package-name>'&semVerLevel=2.0.0'. [<solution-path>]
error : Response status code does not indicate success: 401 (Unauthorized). [<solution-path>]

I have project using packages from both private feed with authentication (jfrog based) and public one.

Restoring packages from IDE like Rider or VS is working fine, however when I am using console it is failing with 401 authorization error.

Any idea how can I fix it?

My global nuget.config file:

<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="jfrog-based-nuget" value="https://myprivate.jfrog.io/artifactory/api/nuget/v3/myprivate-nuget" />
  </packageSources>
</configuration>

Example error:

error : Failed to retrieve information about '<private-package-name>' from remote source '<private-feed>/FindPackagesById()?id='<package-name>'&semVerLevel=2.0.0'. [<solution-path>]
error : Response status code does not indicate success: 401 (Unauthorized). [<solution-path>]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文