0

I've been trying to install 1 npm package from github packages in docker containers that are created in the azure pipelines.

I added one service connection for npm in azure's service connection settings and the specific .npmrc file for that github repository.

But the pipeline fails with:

##[error]#9 15.55 npm ERR! code E401
##[error]#9 15.55 npm ERR! Unable to authenticate, your authentication token seems to be invalid.
##[error]#9 15.55 npm ERR! To correct this please trying logging in again with:
##[error]#9 15.55 npm ERR! npm login

In the .yml file for the pipeline, this is the task for the npm authentication:

- task: npmAuthenticate@0
        inputs:
          workingFile: '$(Build.SourcesDirectory)/.npmrc' 
          customEndpoint: myServiceConnection
        displayName: "Auth with private npm using root npmrc"

What am I doing wrong?

Samu R
  • 334
  • 2
  • 14

0 Answers0