Skip to content

Access Token Installation Guide

Access tokens provide a secure way to authenticate with the RevoGrid Pro repository, especially useful for CI/CD environments or multi-user repository access. Instead of using password authentication, you can create and manage tokens for secure authorization.

Before creating access tokens, you must first configure and login to the npm server. Please follow the NPM Installation Guide instructions first.

To create a new token using the command line, run:

Terminal window
npm token create --registry=https://npm.rv-grid.com

You will be prompted for your password. After entering it, a new token will be displayed in the console:

Terminal window
┌──────────┬─────────────────────────┐
token Ihj...
├──────────┼─────────────────────────┤
user your-username
├──────────┼─────────────────────────┤
cidr
├──────────┼─────────────────────────┤
readonly false
├──────────┼─────────────────────────┤
created 2025-03-21T01:02:03.00Z
└──────────┴─────────────────────────┘

Make sure to copy and securely store the token value.

To view all your available tokens:

Terminal window
npm token list --registry=https://npm.rv-grid.com

This will display a list of all your active tokens:

Terminal window
┌────────┬─────────┬────────────┬──────────┬────────────────┐
id token created readonly CIDR whitelist
├────────┼─────────┼────────────┼──────────┼────────────────┤
b54f12 eyJhb.… 2024-03-21 no
└────────┴─────────┴────────────┴──────────┴────────────────┘

To remove a token, use its ID from the token list:

Terminal window
npm token delete tokenId --registry=https://npm.rv-grid.com

You can use access tokens by creating a .npmrc file in your project directory with the following content:

@revolist:registry=https://npm.rv-grid.com
//npm.rv-grid.com/:_authToken=YOUR-AUTH-TOKEN

Replace YOUR-AUTH-TOKEN with the token value you received when creating the token.

The .npmrc file can be stored in several locations, which npm checks in the following order:

  1. Project-specific: /path/to/your/project/.npmrc
  2. User-specific: ~/.npmrc
  3. Global: $PREFIX/etc/npmrc
  4. npm built-in: /path/to/npm/npmrc

For Continuous Integration/Continuous Delivery (CI/CD) systems, you can use access tokens stored in .npmrc. Add the following to your CI/CD environment’s .npmrc file:

@revolist:registry=https://npm.rv-grid.com
//npm.rv-grid.com/:_authToken=YOUR-AUTH-TOKEN

For teams working on the same project, you have two options for repository access:

  1. Individual Logins: Each developer can use their own credentials to access the repository
  2. Shared Tokens: Create and share access tokens among team members

If you encounter issues with token authentication:

  1. Verify your token is valid by running npm token list
  2. Ensure your .npmrc file is properly formatted
  3. Check that you’re using the correct registry URL
  4. Verify your network can access the npm registry

For additional support or questions, please contact our support team.