Authentication

Login to Bytesafe with your npm, yarn or pnpm client.

To access your private Bytesafe registries you will need to authenticate. Use the instructions below for details.

  • Users working with a CI/CD pipeline may also want to read Managing tokens.
  • Getting Access Denied when interacting with Bytesafe? See Troubleshooting for how to resolve authentication issues.
  • Don’t have an existing workspace yet? Read Getting started to get up and running in less than a minute.

Login to Bytesafe and authenticate

Accessing any Bytesafe registry using either npm, yarn or pnpm clients, requires a valid access token to use with the Bytesafe servers.

Tokens for registries are stored as authToken for the associated registry in the .npmrc file (used by all the common clients).

# access token for a registry is stored in .npmrc file
..
//workspace.bytesafe.dev/r/example-registry/:_authToken=01EBPCA..

Add an access token to .npmrc by running npm login command (see client specific instructions below).

Credentials for npm login

The required credentials to create a new access token for a registry are available in Bytesafe (top of the specific registry page).

registry-credentials

Note: The password provided here is only used to create new access tokens (it can’t be used as a token in itself).

Client specific instructions

Make sure access tokens are always sent to the Bytesafe server with

npm config set always-auth true

Login to your private Bytesafe registry

npm --registry 'https://example.bytesafe.dev/r/default/' login

You will be prompted for the user name, password and an email address. The email address is not used by Bytesafe, but is required by the clients.

Username: bytesafe
Password:
Email(this IS public): example@example.com
Logged in as bytesafe on https://example.bytesafe.dev/r/default/.

Make sure access tokens are always sent to the Bytesafe server with

npm config set always-auth true

Login to your private Bytesafe registry

npm --registry 'https://example.bytesafe.dev/r/default/' login

You will be prompted for the user name, password and an email address. The email address is not used by Bytesafe, but is required by the clients.

Username: bytesafe
Password:
Email(this IS public): example@example.com
Logged in as bytesafe on https://example.bytesafe.dev/r/default/.

Make sure access tokens are always sent to the Bytesafe server with

npm config set always-auth true

Login to your private Bytesafe registry

pnpm login --registry 'https://example.bytesafe.dev/r/default/'

You will be prompted for the user name, password and an email address. The email address is not used by Bytesafe, but is required by the clients.

Username: bytesafe
Password:
Email(this IS public): example@example.com
Logged in as bytesafe on https://example.bytesafe.dev/r/default/.

Managing tokens

How to manage your tokens. Learn how to list, create and revoke tokens.

Troubleshooting

Resolving Unauthorized / Access Denied errors