Getting started
To access your own hosted registries and use all the workflow and security features of Bytesafe, you’ll first have to create a workspace and configure your client.
This is done in less than a minute by following the steps below.
Create your workspace & sign in
Go to Bytesafe Signup and select the workspace name that you would like to use. This will be part of the domain name used to access Bytesafe.
The next step is to create an admin user. Users can sign up with either:
- Social logins (Google or GitHub)
- Email & password.
After workspace creation has been completed, you will be automatically signed in to Bytesafe.
To access an existing workspace, go to
https://<your-workspace-name>.bytesafe.dev
or enter the workspace name when signing in.
Congratulations! Your first private registry: default is automatically created and is ready to be used.
Accessing your Bytesafe registry
Accessing your Bytesafe registry using either npm, yarn or pnpm clients, requires a valid access token to use with the Bytesafe servers.
Add an access token by running login
command (see client specific instructions below).
Make sure access tokens are always sent to the Bytesafe server with
npm config set always-auth true
Add an access token for your private Bytesafe registry
npm --registry 'https://example.bytesafe.dev/r/default/' login
Use the trailing / after the registry to avoid issues with different versions of npm
.
You will be prompted for the username, password and an email address.
Required credentials can be fetched from the registry page in Bytesafe.
Username: bytesafe
Password:
Email(this IS public): example@example.com
Logged in as bytesafe on https://example.bytesafe.dev/r/default/.
The email address is not used by Bytesafe, but is required by the clients.
Done! The access token is now stored in the .npmrc file.
Make sure access tokens are always sent to the Bytesafe server with
npm config set always-auth true
Add an access token for your private Bytesafe registry
npm --registry 'https://example.bytesafe.dev/r/default/' login
Note the trailing / after the registry which is required when using yarn
.
You will need to run npm login
to authenticate as yarn login
does not ask for a password during login.
You will be prompted for the username, password and an email address.
Required credentials can be fetched from the registry page in Bytesafe.
Username: bytesafe
Password:
Email(this IS public): example@example.com
Logged in as bytesafe on https://example.bytesafe.dev/r/default/.
The email address is not used by Bytesafe, but is required by the clients.
Done! The access token is now stored in the .npmrc file.
Make sure access tokens are always sent to the Bytesafe server with
npm config set always-auth true
Add an access token for your private Bytesafe registry
pnpm login --registry 'https://example.bytesafe.dev/r/default/'
Note the trailing / after the registry which is required when using pnpm
.
You will be prompted for the username, password and an email address.
Required credentials can be fetched from the registry page in Bytesafe.
Username: bytesafe
Password:
Email(this IS public): example@example.com
Logged in as bytesafe on https://example.bytesafe.dev/r/default/.
The email address is not used by Bytesafe, but is required by the clients.
Done! The access token is now stored in the .npmrc file.
Install or publish a package
To install npm packages using npm
, see the example below.
npm --registry 'https://example.bytesafe.dev/r/default/' install <package>
If you have previously installed a package you might want to use the —-no-cache
argument to make sure packages are downloaded from Bytesafe and avoid using the local cache .
Publish your npm packages with npm
. If you would like to publish a package to your Bytesafe registry, look at the example below.
npm --registry 'https://example.bytesafe.dev/r/default/' publish <package>
The installed or published package dependencies are now available in Bytesafe.
To add npm packages using yarn
, see the example below.
yarn --registry 'https://example.bytesafe.dev/r/default/' add <package>
If you have previously installed a package you might want to execute yarn cache clean [<module_name…>]
to make sure packages are downloaded from Bytesafe and avoid using the local cache .
Publish your npm packages with yarn
. If you would like to publish a package to your Bytesafe registry, look at the example below.
yarn --registry 'https://example.bytesafe.dev/r/default/' publish <package>
Note the trailing / after the registry which is required when using yarn
.
The added or published package dependencies are now available in Bytesafe.
To add npm packages using pnpm
, see the example below.
pnpm add <package> --registry 'https://example.bytesafe.dev/r/default/'
Publish your npm packages with pnpm
. If you would like to publish a package to your Bytesafe registry, look at the example below.
pnpm publish <package> --registry 'https://example.bytesafe.dev/r/default/'
Note the trailing / after the registry which is required when using pnpm
.
Also note the order: --registry
flag follows after publish
The added or published package dependencies are now available in Bytesafe.
That’s it!
Great! You have now worked with packages using your own private Bytesafe registry. With this you are already making good progress in screening your dependencies and creating a safer code supply chain.
Make sure to explore the other features of Bytesafe such as upstreams, plugins, policies and integrations.
And make sure to invite your team members to join you!
Optional configuration
If you want better control over the flow of packages in and out of your organization, we recommend you to read how to configure and set one of your registries as your default registry.
Getting errors when interacting with Bytesafe?
See Troubleshooting for how to resolve authentication issues.