I have a build in VSTS which is failing with the following error:
error : Unable to load the service index for source [source name] 2018-02-28T09:04:12.1080070Z /usr/share/dotnet/sdk/1.1.4/NuGet.targets(102,5)
error : Response status code does not indicate success: 402 (Payment Required - The user does not have a license for the extension ms.feed.
This happened after reducing the access level of the user who created the Package from Basic to Stakeholder in VSTS, which in turn removed the Package Management extension from that user also. Putting the access level back to Basic and giving them the Package Management extension resolves the issue, although this is not a long term fix as they've left the company now.
I've ensured that there are users that with the Package Management extension, and also with a PAT that has permissions for Packages. I then updated the password in the nuget.config file to be the aforementioned PAT token, however the build still fails with the above error if the user who set the Package is at Stakeholder level.
I'm guessing that the user set up something with their PAT which in some way links them to the package, but I'm struggling to find what this is/where it might be.
I'm running the build on a build agent hosted in Docker.
Any help would be much appreciated - thanks!