0

Our build machine has just started to get the following error when attempting a nuget restore on a c# solution that uses a specific nuget feed (the only project using this feed):

error NU1301: Unable to load the service index for source https://pkgs.dev.azure.com/[path-removed]/_packaging/OurNugetFeed/nuget/v3/index.json
error NU1301: Response status code does not indicate success: 401 (Unauthorized).

(NB part of the path removed because... internet)

I also get the same error when logged onto the build machine as the build machine user and running the command...

msbuild.exe OurApi.sln /t:restore /p:RestorePackagesConfig=true

From my machine (and other devs) who can all build successfully, if we enter the URL in a browser it successfully returns the json feed.

I've specifically added the user into the build administrators group for the project to no avail (and it was never there before)

We are using the VS Build tools on the build server so we do not have VS installed on the build machine. Being

NB I've included both TFS & AzureDevOps tags as this feed is currently being used by both Source control systems we're using, while moving to Git & AzureDevOps

Any ideas would be most welcome.

2
  • Check the permissions and allowed users on the feed itself. (Don’t assume that the build administrators group has access.) If the build user previously had access then the feed’s security settings have probably been changed. Commented Jun 20 at 16:33
  • also make sure that your pipeline has -task: NuGetAuthenticate@1 before the restore. Perhaps CI was using a saved token that expired. Commented Jun 21 at 19:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.