Teams using JFrog Artifactory can manage access to NES packages through 3 easy steps:
-
Configure (or create) a Virtual Repository to leverage the newly created
NES Remote Repository
IMPORTANT: this Virtual Repository is mandatory as a misconfiguration will lead to Artifactory seeking all NPM packages from us. Failure to configure this correctly may result in suspension of your access token. -
Verify your developers are able to access our package through your Virtual Repository.
Step 1: Create a Remote Repository
-
Navigate to
Artifactory
>Repositories
>Remote
-
Select
Create
>Remote Repository
, then selectNPM
as the type -
Configure the following on the
Basic
tab:
-
-
Repository Key:
nes
(or whatever alias your team prefers) -
Username:
artifactory
-
Password:
<your NES access token>
-
Include Patterns:
-
Click the
x
to delete the default**/*
pattern -
Add
.npm/@neverendingsupport/**
-
Add
@neverendingsupport/**
-
-
Remote Mapping Layout:
npm-default
-
4. Configure the following on the
Advanced
tab:
1. Ensure
Bypass HEAD Requests
is checked.
2. Ensure
Disable URL Normalization
is checked.The final results should look something similar to the following:
Basic
NOTE: Our registry does not implement every endpoint in the public NPM registry. As such, some Artifactory features may not function as expected, such as the "Test" button or various search features.
Advanced
Step 2: Configure a Virtual Repository
In this step, you should configure the virtual repository referenced in the
.npmrc
files. This step is fairly straight forward, and only requires adding our private NPM registry after the public npmjs.org
registry. Assumptions:
-
You already configured a
Remote Repository
fornpmjs.org
keyed asnpm-official
-
You already configured a
Remote Repository
for our registry keyed asnes
(see Step 1)
If you already have a Virtual Repository configured with
npm-official
(and potentially other private sources) you can skip the following steps. -
Navigate to
Artifactory
>Repositories
>Virtual
-
Select
Create
>Virtual Repository
, then selectNPM
as the type
Whether creating or editing a new Virtual Repository, add both
npm-official
and nes
repositories to Selected Repositories
with nes at the bottom of the list.In most versions of Artifactory, you should see the following:
Step 3: Verify Access
Assuming again your
Virtual Repository
is keyed as npm-default
and that you have a valid Artifactory username / password, configure your .npmrc
accordingly: Once configured, Artifactory will attempt to download packages under the
@neverendingsupport
namespace from our private registry.