Skip to main content

Connect Your Curated Catalog to Cloudsmith

This guide covers how to connect your ActiveState Curated Catalog to a Cloudsmith repository. Once connected, developers in your organization can pull open source components directly from your secured catalog instead of the public internet, with Cloudsmith proxying and caching requests on demand.

Prerequisites​

  • A Cloudsmith account/organization with permission to create repositories.
  • An ActiveState Curated Catalog with admin access to portal.activestate.com.

Setup steps​

Most of the steps below are the same regardless of language; only the upstream type you add, the URL/credentials you use, and a couple of per-language notes change. Select your language below for the full walkthrough.

  1. Log in to portal.activestate.com.
  2. Click Connect to Catalog from either the Curated Catalogs home page or the Catalog page for your Python catalog.
  3. Click Issue Registry Credentials if this is your first time creating credentials, or Rotate Password if you need new credentials.
  4. Save the username, password, and remote/proxy URL. You'll enter these in Cloudsmith's upstream configuration, not into anything developer-facing.
    1. This is the only time the password is available in plaintext. If you lose it, you'll need to reissue registry credentials.
  5. Log in to Cloudsmith and create a repository (Create a Repository) to hold the proxied/cached catalog content, or use an existing one.
  6. Open your repository, then Repository Settings → Upstreams, and add a new Python upstream.
  7. Fill in:
    • Name: a descriptive name, for example ActiveState Python Curated Catalog.
    • Upstream URL: the remote/proxy URL from step 4, with /simple/. appended (for example, https://repo.activestate.com/<org-id>/pypi/simple/.).
    • Auth mode: Username and Password.
    • Username: the username you saved in step 4 (activestate-repos).
    • Secret: the password from step 4.
    • Mode: Cache and Proxy.
warning

The upstream URL must end in /. (slash-dot), not a plain trailing slash. Cloudsmith strips a plain trailing / from the URL on save, which breaks package resolution through this upstream. A trailing /. survives Cloudsmith's stripping and resolves correctly.

Equivalent API call:

curl -X POST \
-H "X-Api-Key: <your-cloudsmith-api-key>" \
-H "Content-Type: application/json" \
-d '{
"name": "ActiveState Python Curated Catalog",
"upstream_url": "https://repo.activestate.com/<org-id>/pypi/simple/.",
"auth_mode": "Username and Password",
"auth_username": "activestate-repos",
"auth_secret": "<access-token-from-step-4>",
"mode": "Cache and Proxy",
"is_active": true,
"priority": 1
}' \
"https://api.cloudsmith.io/v1/repos/<owner>/<repo>/upstream/python/"
note

Cloudsmith's Python upstream indexes the entire catalog in the background after creation, and individual packages aren't resolvable via pip install until that finishes. This can take a while for a catalog with thousands of packages. Confirm a specific package is live by requesting its page directly (https://dl.cloudsmith.io/basic/<owner>/<repo>/python/simple/<package>/) before relying on it in CI.

Fetch the Python interpreter​

The Python interpreter itself (and its native libraries) isn't a PyPI package. It's served from your catalog's generic binaries path.

  1. Add a second Generic upstream on the same repository.
  2. Fill in:
    • Name: ActiveState Generic Curated Catalog.
    • Upstream URL: https://repo.activestate.com/<org-id>/generic/binaries - this is a different URL than the remote/proxy URL you saved in step 4 (which points at the catalog's PyPI facet), not a path appended to it.
    • Upstream prefix: a unique path segment, for example activestate-generic.
    • Auth mode: Username and Password.
    • Username: activestate-repos.
    • Secret: the password from step 4.
    • Mode: Cache and Proxy.
curl -L -u "<your-cloudsmith-username>:<your-cloudsmith-api-key>" \
"https://generic.cloudsmith.io/<owner>/<repo>/activestate-generic/python-3.12.12-linux-x86_64.tar.gz" \
-o python-3.12.12.tar.gz

This is an example file name - confirm the exact name in your own catalog first by browsing https://repo.activestate.com/<org-id>/generic/binaries/ directly (with your own token) rather than assuming this exact version string is present.

Configure pip to use Cloudsmith​

Create or edit a pip.conf (pip.ini on Windows) at ~/.config/pip/pip.conf (Linux/macOS) or %APPDATA%\pip\pip.ini (Windows):

[global]
index-url = https://<your-cloudsmith-username>:<your-cloudsmith-api-key>@dl.cloudsmith.io/basic/<owner>/<repo>/python/simple/

Test package access​

python3 -m venv .venv
source .venv/bin/activate
pip install --index-url "https://<your-cloudsmith-username>:<your-cloudsmith-api-key>@dl.cloudsmith.io/basic/<owner>/<repo>/python/simple/" requests
python3 -c "import requests; print(requests.__version__)"

Support​

For Cloudsmith-specific issues: Consult Cloudsmith documentation or support.

For ActiveState Curated Catalog issues, contact ActiveState support with:

  • Package name experiencing the issue.
  • Catalog/token configuration, with a screenshot and credentials redacted.
  • Error messages from your package manager or Cloudsmith output.