Use Private Registry as Proxy Cache for Bit Components

Since Bit's package registry implements the CommonJS specification for package managers, it can be easily configured as an NPM Remote Repository.

Afterwards, you can use your internal package registry to consolidate the consumption of your internal packages, public npmjs.org packages and components shared with Bit to create a unified workflow for developers in your organization.

This overall flow of data and components will look similar to this:

First, get token to fetch your components:

  • Log in as an organization administrator.
  • Go to your organization settings.
  • Open the "settings" tab and head to "access token" section.
  • Generate a "read only" access token with the expiration date you prefer.

In your internal package registry of choice, set up the following remote registries:

  • teambit registry, with URL - https://node-registry.bit.cloud
  • bitdev registry, with URL - https://node-registry.bit.cloud
  • YOUR-ACCOUNT-NAME registry, with URL - https://node-registry.bit.cloud

Use the generated access token for each of the registries.

Once done, all developers in your organization using your standard package registry as a main package consumption source will be able to install components from Bit. Your package registry will act as a proxy/cache for all component installations without having to configure any new registries for your consumers.

Use JFrog Artifactory

For teams using JFrog Artifactory solution, you will need to follow the steps for creating a remote NPM registry and then add them to your npm virtual repository.

When you set up the authentication, you do not have the option to select "bearer token" for Artifactory, so set the following values:

  • User Name - ___user-token
  • Password / Access Token - Organization access token.

Configuration should look similar to this:

Use Sonatype Nexus

For teams using Sonatype Nexus solution, you will need to follow the steps for creating a remote NPM registry.

Use the "Bearer token" authentication option for the remote NPM registry, and place the generated token there.