I have a problem that has randomly started happening today whereby all my DevOps Pipelines can no longer access my NuGet feed, which is a DevOps Artifact.
I have a task that is responsible for installing AzureSignTool, below is the YAML for that. I am using the windows-latest image on a Microsoft hosted agent.
- task: CmdLine@2
displayName: 'Install AzureSignTool'
inputs:
script: |
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
dotnet tool install --global AzureSignTool --version 4.0.1
This is the task that is failing with the following error.
Unhandled exception: NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source . ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
I have checked the permisisons on the feed and I can confirm that Project\Build Administrators are set as owners.
I have also tried various other things including changing the version of NuGet on the agent, changing the version of AzureSignTool etc.
What permissions / settings should I check?
Update
So I moved the RestoreNuGetPackages task before the InstallAzureSignTool and this task succeeds, so clearly it can authenticate without issue.
However the task still fails. I have even added the --ignore-failed-sources but this had no effect.
The error message has changed, but the underlying issue is the same.
[NuGet Manager] [Info] GET https://api.nuget.org/v3/registration5-gz-semver2/azuresigntool/index.json
[NuGet Manager] [Info] GET https://{ORG}.pkgs.visualstudio.com/_packaging/{GUID}/nuget/v3/registrations2-semver2/azuresigntool/index.json
[NuGet Manager] [Info] Unauthorized https://{ORG}.pkgs.visualstudio.com/_packaging/{GUID}/nuget/v3/registrations2-semver2/azuresigntool/index.json 767ms
[NuGet Manager] [Info] OK https://api.nuget.org/v3/registration5-gz-semver2/azuresigntool/index.json 1010ms
Unhandled exception: System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
Further update
Switching image from windows-latest to windows-2019 has resolved the problem so whatever changes Microsoft have done to the latest image are problematic. However this is not an ideal solution as we have VS2022 paths for TextTransform in the project file so the build fails later in the process.
How can I raise this issue with the appropriate team at Microsoft?





I am having an issue as well suddenly. Maybe this can help someone else. I fired off a build on the 10th and it worked just fine then I ran a build yesterday and it failed even though I had no code changes or settings changed either.
My issue was: Unable to load the service index for source. This was due unauthorized access to the URL specified in the nuget.config because the implicit restore that takes place in the publish task cannot access authorized feeds. (Weird, since it was working before.) Although, I did notice that there was a change recently pushed to the virtual machine image I'm using (windows-latest).
My workaround was to add --no-restore argument to the publish task and add a explicit restore task prior to the publish task. It builds fine now.
Here is what those two steps look like now.
Here is what I had before: