Parminder Singh
Parminder Singh

Reputation: 87

Getting 404 error in azure-pipeline to fetch NPM packages from AZURE-ARTIFACT?

In azure-artifact we setup a "project scope" feed name "feed1" where we have NPM packages. This feed has been attached to "Project1".

Now my "Project2" pipeline is not able to fetch package from "feed1".

NOTE: All NPM packages exist in AZURE-ARTIFACT but still I'm getting 404 error.a

Upvotes: 0

Views: 3541

Answers (1)

LoLance
LoLance

Reputation: 28096

Now my "Project2" pipeline is not able to fetch package from "feed1".

Since that's a project-scoped feed within Project1, your Project2's pipeline can't find the package from feed1 by default. It's by design behavior.

If you're using Npm Install task to install the packages with this option:

enter image description here

Then you can try steps below to resolve that issue:

1.Go Organization Settings=>Settings(Pipelines) to disable Limit job authorization scope to current project option. (Pipelines can run with collection scoped access tokens unless this option is enabled. With this option enabled, you can reduce the scope of access for all pipelines to the current project.)

2.Then in Project2: Go Project Settings=>Settings(Pipelines) and disable Limit job authorization scope to current project option. So that Project2's pipeline can access project1's feed with collection scoped access token.

3.Run the Project2's pipeline again, if the issue persists. Then check feed1's feed settings:

  • Add Project2 Build Service as Contributor role in Permissions.

  • Edit the Views's settings and make sure your Project2 can access them.

(If the missing package comes from local view/Upstream source, edit the Local view. If the missing package comes from PreRelease/Release view, edit corresponding views.)

enter image description here

Upvotes: 9

Related Questions