Create Your First Repository

Repositories are the core of CloudRepo - they store and organize your artifacts. This guide helps you create and configure your first repository.

Understanding Repository Types

CloudRepo supports multiple repository types:

  • Maven - For Java/JVM artifacts

  • Python - For Python packages

  • npm - For Node.js packages

  • Raw - For any file type

  • Proxy - Cache external repositories

Creating a Repository

Step 1: Access Repository Management

  1. Log into your CloudRepo dashboard

  2. Click “Repositories” in the navigation menu

  3. Click the “Create Repository” button

Step 2: Configure Basic Settings

  1. Repository Name: Choose a descriptive name (e.g., “my-maven-releases”)

  2. Repository Type: Select your package format

  3. Repository Format: Choose between:

    • Release - For stable, versioned artifacts

    • Snapshot - For development builds

    • Mixed - Supports both (not recommended for production)

Step 3: Set Access Permissions

  1. Visibility:

    • Private - Requires authentication

    • Public - Read access for everyone

  2. Access Control:

    • Assign users or groups

    • Set read/write permissions

Step 4: Review and Create

  1. Review your configuration

  2. Click “Create Repository”

  3. Note the repository URL for configuration

Example: Creating a Maven Repository

Name: my-maven-releases
Type: Maven2
Format: Release
Visibility: Private

Repository URL: https://[org-id].mycloudrepo.io/repositories/my-maven-releases

Configuring Your Client

After creating your repository, configure your build tool. Package clients authenticate as a repository user. Create a dedicated one for your builds rather than using an owner account’s portal login.

In the admin portal, go to Users, then Create a Repository User. Enter an email address and a password for the build identity, then grant it access to the repositories it needs. That email address and password are the credentials your build tool uses (HTTP Basic authentication).

Maven (Maven Repositories)

<repository>
    <id>cloudrepo</id>
    <url>https://[org-id].mycloudrepo.io/repositories/my-maven-releases</url>
</repository>

Python (Python Repositories)

[global]
index-url = https://[org-id].mycloudrepo.io/repositories/my-python-releases/

npm (npm Repositories)

npm tokens are minted with the npm CLI against your repository registry, not in the admin portal. Authenticate as the repository user you just created:

npm token create --registry=https://[org-id].mycloudrepo.io/repositories/[repo-name]/

Then put the returned token in a .npmrc file in your project root:

registry=https://[org-id].mycloudrepo.io/repositories/[repo-name]/
//[org-id].mycloudrepo.io/repositories/[repo-name]/:_authToken=YOUR_NPM_TOKEN

The token is revocable independently of the user’s password. List tokens with npm token list and revoke one with npm token revoke <id>, both against the same --registry.

Note

Older docs may reference npm login. Modern npm (v10+) rejects email addresses as usernames, which CloudRepo requires. The .npmrc token pattern above works for every customer and every CI/CD environment.

Testing Your Repository

Upload a Test Artifact

Maven:

mvn deploy

Python:

twine upload --repository cloudrepo dist/*

Download Your Artifact

Maven:

mvn dependency:get -DartifactId=your-artifact

Python:

pip install your-package --index-url https://[org-id].mycloudrepo.io/repositories/my-python-releases/simple

npm:

# Verify authentication
npm whoami --registry=https://[org-id].mycloudrepo.io/repositories/[repo-name]/

# Publish a test package
npm publish --registry=https://[org-id].mycloudrepo.io/repositories/[repo-name]/

# Install a package
npm install package-name --registry=https://[org-id].mycloudrepo.io/repositories/[repo-name]/

Troubleshooting

Common issues and solutions:

  • Authentication Failed: Check your credentials in settings.xml or .pypirc

  • 404 Not Found: Verify the repository URL and that the artifact was uploaded

  • 403 Forbidden: Ensure your user has write permissions for uploads

Next Steps