Personal Access Token
This token will allow you to access private packages hosted in Acro Commerce's GitLab registry.
Generating your Access Token
- Click here to generate your Access Token
- Name the token meaningfully (e.g.
desktop workstation - npm private registry) - Select the API Scopes you need (see below for how to choose)
- Click the
Create personal access tokenbutton - Copy the created token into your
~/.npmrcfile (see below for more information)
Token Name
We recommend something similar to desktop workstation - npm private registry so that it’s
easy to keep track of and revoke if needed.
API Scopes
If you need to be able to publish from your local machine select the
following api scope options: read_registry, write_registry & read_api. That will give you read/write access to
the npm registry. If you only need read access for downloading and installing packages select only read_api.
The .npmrc file
Placing your ~/.npmrc file at the root of your home directory will work when using Node.js locally (i.e. not within
containers).
If you don't use Node.js locally (i.e. you only use Node.js from within containers):
- You will need to place a
.npmrcfile in the root of your project directory instead. - Double check that
.npmrcis specified in the project's.gitignorefile. Committing your gitlab personal token is the same thing as committing your private ssh key: It grants anyone who sees it the abiltity to act as you. - Symlinking (or hard linking) the
.npmrcfile from your home directory to the project directory won't work.
Example .npmrc file:
@acromedia:registry=https://git.acromedia.com/api/v4/packages/npm/
//git.acromedia.com/api/v4/packages/npm/:_authToken=YOUR_PERSONAL_TOKEN_VALUE
//git.acromedia.com/api/v4/projects/:_authToken=YOUR_PERSONAL_TOKEN_VALUE
If you have already installed your project, you might need to execute the pnpm cache clean command to ensure the
changes take effect. In certain cases, users have also reported the need to remove the node_modules directory before
running pnpm install.