Use an auth token via .npmrc for automated publishing.
Section: Registry and Authentication
Store token in .npmrc
bash
bash
printf '//registry.npmjs.org/:_authToken=${NPM_TOKEN}\n' >> .npmrcExplanation
Use an auth token via .npmrc for automated publishing.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Registry and Authentication
Logout from a registry
Remove login credentials for the current registry.
Show current registry user
Show the account currently authenticated for the active registry.