My application uses an yarn package which is installed in local after authentication.Registry url is specified in .npmrc file. Now my build pipeline fails, and says "Package restore failed" (Request failed "401 Unauthorized""). How to authenticate the azure devops build pipeline?
I tried adding a task in my YML file as below , specified the npmrc path in it,so that it silently authenticate from the pipeline process, but this doesn't work
task: npmAuthenticate@0
inputs:
workingFile: "Portal/.npmrc"
customEndpoint: msasg.pkgs.visualstudio.com, 1DS-SDK
displayName: "Authenticate NPM"
Is there a different way to achieve this?
.npmrc
and the registry entries inyarn.lock
. – Frederik Krautwald