2
votes

We have TFS Version 16.122.27409.2 and a build server hosted on premise. We are experiencing an issue with our automated build system when the build tries to restore packages from the TFS feed:

Unable to load the service index for source http://ngt-tfs:8080/tfs/NGT-Collection-01/_packaging/ad100c06-9a78-4ff2-b37a-23518a33370b/nuget/v3/index.json.

Response status code does not indicate success: 401 (Unauthorized).

NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source http://ngt-tfs:8080/tfs/NGT-Collection-01/_packaging/ad100c06-9a78-4ff2-b37a-23518a33370b/nuget/v3/index.json. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).

Things I have tried so far:

  • Turn off automatic proxy detection on build server
  • Disable anti-virus/firewalls on build server
  • Add windows account of the build server as the owner on TFS Nuget Feed permissions
  • Update VS 2017 to the latest version
  • Try using a nuget.config file in the build definition, instead of picking the feed from the drop-down list

Build tasks: enter image description here

1
Are you using the NuGet Installer task beforehand to make sure there's an appropriate version of NuGet available?Daniel Mann
Yes, it is set to NuGet version 4.6.2umutesen

1 Answers

1
votes

It turns out that TFS expects IIS basic auth setting to be Off, which was not the case on our environment.

https://developercommunity.visualstudio.com/comments/142485/view.html