NPM allows the use of multiple repo hosts, as long as they can be identified by namespace.
Ripple 2 is hosted publicly on Github Packages (ghcr) under the @dpc/sdp namespace, so a few steps need to be followed access these packages, while also co-existing with the npm ecosystem.
First, create a Personal Access Token on Github:
- Visit https://github.com/settings/tokens and select Generate new token > Generate new token (classic)
- Fill in the Note and choose an Expiration - the 30 day default is generally fine, you'll receive a reminder to regenerate the token just before expiry
- Set the scope to only allow
read:packages, and Generate token
- Store the resulting token somewhere secure, and add it to either a user
.npmrc(recommended) or the project-level
.npmrc(the url on line 2 below is protocol-less, not a comment):
@dpc-sdp:registry=https://npm.pkg.github.com //npm.pkg.github.com/:_authToken=<github personal access token>
Propose a change to this page on GitHub.