Configuration
To be able to use the Quantum librairies, an artifactory account is needed.
-
Ask for an artifactory account
-
After the confirmation that your access is granted, then log in the artifactory platform with your credentials.
To set up your .npmrc
file to replace the default npm registry with an Artifactory registry, you'll need to configure the registry URL in your npm configuration. You can do this manually by editing the .npmrc
file or by using the "Set Me Up" button in the Artifactory dashboard. Here's a step-by-step guide for both methods:
Method 1: Manual Configuration
- For your npm command line client to work with Artifactory, you first need to set the default npm registry with an Artifactory npm repository using the following command:
npm config set registry https://artifactory.thalesdigital.io/artifactory/api/npm/npm/
- Using basic authentication, you need to generate an identity token into your profile.
and set this token using the following command:
curl -u <user_email>:<user_identity_token> https://artifactory.thalesdigital.io/artifactory/api/npm/auth >> ~/.npmrc
curl -u <user_email>:<user_identity_token> https://artifactory.thalesdigital.io/artifactory/api/npm/auth >> %USERPROFILE%/.npmrc
Check your .npmrc file, it should be like:
registry=https://artifactory.thalesdigital.io/artifactory/api/npm/npm/
_auth = xxxxx
email = xxxxx
always-auth = true
Method 2: Using "Set Me Up" in Artifactory Dashboard
-
Log in to your Artifactory dashboard.
-
In the Artifactory dashboard, go to the navigation bar and look for a "Set Me Up" button/link.
- Click on the "Set Me Up" button and select the npm package manager.
- Generate an identity token
- Artifactory will provide you with configuration instructions.
Follow the instructions provided by Artifactory. These instructions will often include a command to set the registry URL using the npm config set command:
npm config set registry https://artifactory.thalesdigital.io/artifactory/api/npm/npm/
Copy / Paste the following into the ~/.npmrc file (in Windows %USERPROFILE%/.npmrc):
_auth = xxxxx
email = xxxx
always-auth = true
Check your .npmrc file, it should be like:
registry=https://artifactory.thalesdigital.io/artifactory/api/npm/npm/
_auth = xxxxx
email = xxxxx
always-auth = true