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.
-task: NuGetAuthenticate@1before the restore. Perhaps CI was using a saved token that expired.