无法在八达通中添加外部VSTS NuGet Feed

时间:2017-01-17 09:24:33

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

我正在尝试将外部NuGet源添加到我的VSTS源,但是当我保存&测试Feed,我得到以下异常:

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)

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

Octopus version 3.7.18

2 个答案:

答案 0 :(得分:0)

错误消息表示授权失败。

尝试使用以下命令将帐户信息存储在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

答案 1 :(得分:0)

我联系了章鱼支持,他们已经证实这是一个错误:

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

与此同时,您可以使用VSTS的V2 Feed网址进行验证:

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