Create a Repository
You can create a new repository in three ways:
- Via the Cloudsmith CLI
- Via the Website UI
- Via the Cloudsmith API
Via the Cloudsmith CLI
In the following examples:
Identifier | Description |
---|---|
OWNER | A Cloudsmith organisation account name (namespace) |
REPO-NAME | A name for your repository. |
REPO-DESC | Description for your Repository |
REPO-TYPE | The type of repository - "Public" or "Private" |
REPO-IDENTIFIER | (Optional) A unique identifier for the repository, also referred to as a 'slug'. This will form part of the URI for your repository. It can only contain lowercase alphanumeric characters, hyphens, and underscores and must be a minimum of 2 characters. |
NOTE
If you do not specify a repository identifier, we will generate one for you. We will try to base this on the repository name where possible but may also append some characters to it. If you require a specific repository identifier, we recommend that you do specify one.
Create a REPO-CONFIG.json
file with the following:
{
"name": "REPO-NAME",
"description": "REPO-DESC",
"repository_type_str": "REPO-TYPE",
"slug": "REPO-IDENTIFIER"
}
You can create then a repository via the Cloudsmith CLI using the following command:
cloudsmith repos create OWNER REPO-CONFIG.json
Example
example-repo-config.json
file:
{
"name": "Example Repository",
"description": "Example packages repository",
"repository_type_str": "Private",
"slug": "example-repo1"
}
Create repository command:
cloudsmith repos create demo example-repo-config.json
Via the Website UI
You can create a repository by clicking on the + dropdown on the top menu bar and selecting "New Repository".
That will take you to the "Create Package Repository" form:
Here you can create a new repo by selecting a Repository Owner (the namespace you want the repo to live under) and a name. You can also specify an optional 'slug' (identifier) for the repository, this is what will appear in the URL for the repository. The identifier can only contain lowercase alphanumeric characters, hyphens, and underscores. If you don't specify an identifier, one will be automatically generated from the repository name for you.
The Storage Region allows you to choose a geographic region for the repository (see Custom Storage Regions for further details).
Then you need to select the type; Public, Private or Open-Source.
Multi-Format Repositories
All Cloudsmith repositories are multi-format. This means you can store artifacts of different formats in the same logical grouping. A Maven package can sit beside a Debian package, a Ruby Gem or a Python package!
Public Repositories
All accounts (including free accounts) come with unlimited Public repositories.
If you select Public then all files in the repository are available to anyone. Public repositories may be listed on your Cloudsmith public profile and may be searchable on the Public Package Dashboard (not implemented).
Private Repositories
All paid accounts come with unlimited Private repositories.
Private repositories are private. If required, external access to any files in a private repository is controlled by our Entitlement system. See "How To: Sharing a Private Package" for more details.
Open Source Repositories
All accounts provide Open-Source repositories for all your cool OS projects. We offer this to give back to the OS community which we lovingly support and contribute to.
We ask for some additional information and confirmations to keep you and ourselves right. If you would like to discuss this or potential cross-promotion contact us :)
Back to creating a repository:
Once you've filled in the fields just hit the green "Create" button.
And that's it...
The repository is created. You will be able to manage your Repository; upload Packages, manage your Entitlement Tokens, GPG & RSA Keys, access Logs and Statistics, and change the Repository settings.
Changing Repository Settings
The good thing about Cloudsmith is that you can change everything later. The name, slug, description, repository type can all be changed if necessary. Although once shared, if you change the settings or naming you may need to communicate this to all interested parties.
Via the Cloudsmith API
For details on how to create a repository via the Cloudsmith API, please see the "Create a Repository" section of the API Reference, including an interactive sandbox where you can test your API Calls.
NOTE
It is not currently possible to create Open Source repositories via the Cloudsmith API.
Updated 7 months ago