The instructions on how to migrate to Yarn 2 are unclear, and it's not obvious how to authenticate to a private registry which uses a username and password.
Here's the contents of my .npmrc
file:
registry=https://pkgs.dev.azure.com/<private-path>/registry/
always-auth=true
//pkgs.dev.azure.com/<private-path>/registry/:username=${NPM_USER}
//pkgs.dev.azure.com/<private-path>/registry/:_password=${NPM_TOKEN}
The documentation for .yarnrc.yml
only mentions how to deal with a token, but doesn't mention anything about a username. I've also tried using npmAuthIdent
, but I don't know the correct syntax.
How can I authenticate with my private registry using yarn 2? For the moment I've had to downgrade back to yarn 1, so that I can use the npmrc file