I want to authenticate the .npmrc present in gitlab , to azure devops using my jenkins pipeline. Could you please advice How to do that?
You can add the .npmrc file to the same path as Package.json file.
Then you can add the following content in the .npmrc file
; begin auth token
//pkgs.dev.azure.com/orgname/projectname/_packaging/feedname/npm/registry/:username=xx
//pkgs.dev.azure.com/orgname/projectname/_packaging/feedname/npm/registry/:_password=[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN]
//pkgs.dev.azure.com/orgname/projectname/_packaging/feedname/npm/registry/:email=npm requires email to be set but doesn't use the value
//pkgs.dev.azure.com/orgname/projectname/_packaging/feedname/npm/:username=xxx
//pkgs.dev.azure.com/orgname/projectname/_packaging/feedname/npm/:_password=[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN]
//pkgs.dev.azure.com/orgname/projectname/_packaging/feedname/npm/:email=npm requires email to be set but doesn't use the value
; end auth token
You need to generate PAT in Azure DevOps, then transfer it to Based64 type and add it to .npmrc file to authenticate the feed.