I have an Azure DevOps pipeline which runs on a self-hosted build agent, which has started failing on the Restore step. There is a Nuget.config file for the solution, with a reference to my own Artifacts feed, and a placeholder in the package credentials, which is replaced with a PAT token by the pipeline in the first step. This is the error in the pipeline run:
NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source https://pkgs.dev.azure.com/myOrganisation/_packaging/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/nuget/v3/index.json.
---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden - User 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' lacks permission to complete this action. You need to have 'ReadPackages'. (DevOps Activity ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)).
The user ID given doesn’t match any in my Azure AD tenant, nor my organisation, it doesn’t appear in the user list when I try to add a new user to the Artifacts Feed, and I haven’t yet found a CLI command that can identify it.
I’ve tried:
- Generating a new PAT to be injected into the nuget.config with package read permissions
- Re-installing the build agent
- Using an Azure-hosted build agent
- Adding ALL users that are available as readers of the Artifact feed
- Running VS on my build agent via remote desktop and restore/rebuild solution works fine
- Running this command just hangs