Access artifacts from one project to another in azure devops

·

1 min read

Azure Artifacts Permissions

Go to permissions of the project-scoped artifact and provide permissions to Build service of that project.

Search in this format:

| The project-level build identity is named [Project name] Build Service ([Organization name]), for example FabrikamFiber Build Service (codesharing-demo).

Project level Permissions

Go to the same project settings and allow Reader access to the same build service.

We don't need to use any authentication for feeds within the same organization.

Reference:

https://learn.microsoft.com/en-us/azure/devops/artifacts/feeds/feed-permissions?view=azure-devops#pipelines-permissions

https://learn.microsoft.com/en-us/azure/devops/organizations/security/change-project-level-permissions?view=azure-devops&tabs=preview-page

Add npmAuthenticate@0 task

Add the above task in the pipelines so that it can add the credentials in the existing npmrc file. Do not add creds manually in the file.

Similary for nuget, either use nugetAuthenitcate task or donetCore tasks will add credentials automatically.