Setting up your Cloudsmith account and workspace
This guide takes you from sign up to your first package. Using this guide you will:
- Sign up for a Cloudsmith account.
- Create your workspace.
- Create your first repository.
- Add an upstream to your repository.
- Add a package to your repository.
Package formats
This guide uses the
npmpackage manager as an example, but the steps apply to all supported package formats. Format-specific instructions are also available in the Cloudsmith web app.
Step 1: creating your Cloudsmith account
Navigate to the Cloudsmith account sign up page. Enter your email address and click Continue.
On the next screen, enter your details, password, and password confirmation, and accept the service terms and conditions. Once these fields are complete, click Continue.
Step 1.1: email verification and log in
A verification email containing a log in link is sent to the address you used to sign up. Open the email and click the link to complete sign up.
The link takes you to the log in page. Enter your email and password and click Continue to log in to your Cloudsmith account.
Step 2: create your workspace
When you log in for the first time, you are prompted to create your workspace. Enter a name for the workspace and click Continue. You can change the name later.
Step 3: creating your first repository
You are now asked to create a repository. Enter a name for the repository and click Continue. You can change the name later.
Repository overview
Once the repository is created, the repository overview is shown:
Step 4: adding an upstream proxy
An upstream is an external source that your repository proxies or mirrors. Adding one lets you pull packages from a public registry through Cloudsmith, so they are cached, scanned, and governed by your policies.
This example adds an upstream for npm, the package manager for Node.js, but the steps are broadly similar for all upstreams.
Uploading instead of proxying
You can also push packages directly to a repository instead of proxying them from an upstream. Use an upstream when you want to consume packages from a public registry through Cloudsmith; upload directly when you are publishing your own packages. See upstreams for more detail.
Click the Upstreams menu item to open the Upstreams view.
Adding upstreams
For security reasons you may be asked to re-enter your credentials when adding an upstream.
The Upstreams view lists the most common upstream proxies. Select the upstream you want to add. If you can't see it in the list, click Add Upstream Proxy to show the full list of available upstreams.
Once the upstream is added, it reads as Configured. In the example below, the NPMJS.com upstream has been added to the repository. All enabled upstreams appear in the Upstream Proxying table below the list, where you can disable or delete them.
Step 5: generating an API key
Repositories are private by default, so authentication is required to add or remove packages. There are several ways to authenticate; this example uses a personal API key.
To generate an API key
- Select your user profile icon in the top right corner and select Personal API Keys from the menu.
- In the API Keys view, click Create API Key.
- The generated API key is displayed. Store it securely: it cannot be retrieved again once the dialog is closed.
Step 6: adding a package to your repository
Repositories are multi-format
A single repository can hold packages from multiple formats, so you can add more upstreams and formats to the same repository later.
Return to your repository by clicking the Cloudsmith icon in the top left corner, selecting your workspace from the workspace list, clicking the Repositories menu item, and then selecting your repository.
To add a package, click either Add a Package or Push/Pull Packages.
The package format selection view
The package format selection view lists the formats you can add to your repository. If your preferred format isn't shown, click Show all formats for the complete list.
Format-specific instructions
Clicking your required format presents the relevant set up instructions. Follow them to pull down your first package. An example for npm is shown below:
Written instructions for every supported format are also available in the package formats documentation.
Next steps
- Add users to your workspace so your team can use the repository.
- Review repository privileges to control who can read and write packages.
- Explore supply chain security to scan and govern the packages you pull.