# Setup NPM Access Token
- Go to https://github.com/settings/tokens
- Generate new token with write:packages permission
Some projects require .npmrc and some env NPM_GITHUB_ACCESS_TOKEN, you should configure both.
# Setup .npmrc
Create ~/.npmrc file on your PC with content.
@smartsupp:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<YOUR_TOKEN>
# Setup $NPM_GITHUB_ACCESS_TOKEN
Some project have already created .npmrc files and requires env NPM_GITHUB_ACCESS_TOKEN.
You can set it via ~/.bash_profile like this:
export NPM_GITHUB_ACCESS_TOKEN=<YOUR_TOKEN>
NOTE: Token start working only for new terminal windows.
After setup env you can test it echo $NPM_GITHUB_ACCESS_TOKEN.