I was annoyed to find tha the NPM website lets you generate auth tokens manually, but does not provide any instructions on how to configure them in your local workspace. The only instructions are to give your username and password to npm login
, which will then configure our workspace.
But all npm login
does is pop the token into some annoyingly undocumented config fields in ~.npmrc
. You can just as easily do this manually, if you would rather not type your password into a terminal script.
- Log in to the NPM website and generate an auth token.
- Put it in your
~/.npmrc
file like so:
//registry.npmjs.org/:_authToken=YOUR-TOKEN-WOULD-GO-HERE