Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I configure the auth parameter when using lerna publish?

Tags:

npm

lerna

I have an .npmrc set up to publish to a private registry, but I do not want to check in auth credentials. How do I provide the _auth config when running lerna publish?

Unfortunately lerna publish does not accept the _auth flag: https://github.com/lerna/lerna/tree/master/commands/publish#options

like image 503
wesley Avatar asked Jan 22 '26 20:01

wesley


1 Answers

I found out you can set npm config parameters using environment variables, so this does the trick:

npm_config__auth=AUTH npx lerna publish # yes, double underscore
like image 83
wesley Avatar answered Jan 25 '26 16:01

wesley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!