0

I'm trying to add an external NuGet feed to my VSTS source, but when I save & test the feed, I'm getting the following exception:

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)

When I enter the feed's URL into the browser and enter my personal access token, it authenticates fine...

Octopus version 3.7.18

Community
  • 1
  • 1
David Masters
  • 8,069
  • 2
  • 44
  • 75

2 Answers2

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

starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53
0

I contacted octopus support who have confirmed it is a bug:

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

In the meantime, you can just use VSTS's V2 feed url which authenticates fine:

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

David Masters
  • 8,069
  • 2
  • 44
  • 75