We use Azure DevOps onPremise (Azure DevOps Server 2020 Update 1). There we have two collections. "Libraries" and "Projects".
The "Libraries" collection contains a project that hosts an npm artifact feed.
We can run a pipeline in the "Libraries" project and access packages from the feed (e.g. via npm install
).
Additonally, we have a pipeline in a "Projects" collection project, were we created a "Service Connection" ('iconenpm') to the "Libraries" npm feed using a PAT. (This PAT was created for the pipeline user and is BASE64 encoded).
The PAT is also added to the pipeline user's %userprofile%\.npmrc
file.
However, we are not able to successfully run an npm install
.
This is the task:
- task: Npm@1
displayName: 'npm install'
inputs:
command: 'install'
customEndpoint: 'iconenpm'
and the error:
npm ERR! code E401
npm ERR! Unable to authenticate, your authentication token seems to be invalid.
npm ERR! To correct this please trying logging in again with:
npm ERR! npm login
...
additonal log output
...
2085 error code E401
2086 error Unable to authenticate, your authentication token seems to be invalid.
One note: when there is no package from our custom feed in the package.json
, the pipeline works fine. As soon as we want to access some package via the Service Connection, the pipeline fails.
Does anyone have some suggestions?