【问题标题】:Cannot add external VSTS NuGet Feed in Octopus无法在 Octopus 中添加外部 VSTS NuGet Feed
【发布时间】:2017-01-17 09:24:32
【问题描述】:

我正在尝试将外部 NuGet 提要添加到我的 VSTS 源中,但是当我保存并测试提要时,出现以下异常:

NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source https://*********.pkgs.visualstudio.com/_packaging/QA/nuget/v3/index.json. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized)

当我在浏览器中输入提要的 URL 并输入我的个人访问令牌时,它可以正常验证...

Octopus version 3.7.18

【问题讨论】:

    标签: azure-devops octopus-deploy azure-artifacts


    【解决方案1】:

    错误信息表示授权失败。

    尝试使用以下命令将帐户信息存储在 NuGet.config 中:

    nuget.exe sources add -name {your feed name} -source {your feed URL} -username {anything} -password {your PAT}
    

    或者

    nuget.exe sources add -name {feed name} -source {feed URL} -username {username} -password {PAT} -StorePasswordInClearText
    

    更多信息,可以参考这篇文章:Authenticating to feeds with NuGet

    【讨论】:

    • 嗯,不确定这在 Octopus 的上下文中是否可行?
    【解决方案2】:

    我联系了章鱼支持,他们确认这是一个错误:

    https://github.com/OctopusDeploy/Issues/issues/3081

    同时,您可以使用 VSTS 的 V2 提要 url,它可以很好地进行身份验证:

    https://<instance-name>.pkgs.visualstudio.com/_packaging/<feed-name>/nuget/v2

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-24
      • 2018-03-29
      • 1970-01-01
      • 1970-01-01
      • 2018-12-08
      • 1970-01-01
      相关资源
      最近更新 更多