0

我正在尝试将外部 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

4

2 回答 2

0

The error message means it is failed authorize.

Try to store the account information in NuGet.config by using this command:

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

Or

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

More information, you can refer to this article: Authenticating to feeds with NuGet

于 2017-01-18T05:33:06.377 回答
0

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

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

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

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

于 2017-01-18T08:51:36.087 回答