I am looking for a way to remove the need to write the Azure DevOps npm artifactory npm token to a file. In the docs they provide for non Windows environment, they say we should add this content to our .npmrc
.
registry=https://pkgs.dev.azure.com/<org>/<project>/_packaging/<registry>/npm/registry/
always-auth=true
; begin auth token
//pkgs.dev.azure.com/<org>/<project>/_packaging/<registry>/npm/registry/:username=<org>
//pkgs.dev.azure.com/<org>/<project>/_packaging/<registry>/npm/registry/:_password=[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN]
//pkgs.dev.azure.com/<org>/<project>/_packaging/<registry>/npm/registry/:email=npm requires email to be set but doesn't use the value
//pkgs.dev.azure.com/<org>/<project>/_packaging/<registry>/npm/:username=<org>
//pkgs.dev.azure.com/<org>/<project>/_packaging/<registry>/npm/:_password=[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN]
//pkgs.dev.azure.com/<org>/<project>/_packaging/<registry>/npm/:email=npm requires email to be set but doesn't use the value
; end auth token
However, I would like to use environment variables for this if it's possible somehow.