How to Manage Repositories and Upstream Mirrors
Enable and disable repositories, configure anonymous access, browse cached packages, view per-repository traffic, and set up client connection guides.
Overview
Repositories in Chainsaw represent upstream package registries that the proxy mirrors. Each repository is a pull-through cache for a specific ecosystem — when a package is requested, Chainsaw fetches it from upstream, caches it locally, and serves it to the client. This tutorial covers managing these repositories.
Prerequisites
- Admin or Owner role in Chainsaw
- Understanding of which package ecosystems your organization uses
Step 1: View All Repositories
Navigate to Settings → Repositories. The Repository catalog lists every configured repository; filter it by ecosystem or search by name.

| Column | Description |
|---|---|
| Name | Repository identifier (e.g., npmjs, pypi) |
| Format | Package ecosystem (npm, pip, maven, etc.) |
| Repository enabled | Switch: whether the repository serves requests |
| Anonymous access | Switch: whether requests without credentials are accepted |
| Remote | The upstream registry URL |
| Cache TTL | How long cached metadata is reused before Chainsaw re-checks upstream |
Click a row to open the repository’s management sheet, with Overview, Packages, Config and Traffic tabs.
Step 2: Enable or Disable Repositories
Turn repositories on or off with the Repository enabled switch in the catalog row. Disabled repositories reject all requests.

Step 3: Configure Anonymous Access
By default, repositories require client credentials. To accept requests without credentials for a specific repository (e.g., for open development environments), turn on its Anonymous access switch in the catalog.

Step 4: Browse Cached Packages
Open a repository and switch to the Packages tab. It lists each cached package with its versions and how many of them are vulnerable; click a package for its versions. Until clients have pulled something through the repository, the tab says “No packages cached yet”.

The Overview tab summarises the repository: format, status, anonymous access, remote, proxy path, cache TTL, total packages and repository size.
Step 5: View Per-Repository Traffic
The Traffic tab shows a rolling window of requests for that repository, with Requests, Block rate and Cache hit ratio.
To compare repositories over time, use Intelligence → Activity: one row per repository and one dot per day, filled for blocked requests and hollow for monitor-mode flags.

This helps you understand:
- Which repositories see blocks, and how often
- When a repository flipped between monitor and block
- How effective the cache is per registry (Traffic tab)
Step 6: Check Repository Config and Client Setup
The Config tab shows the repository’s remote URL and request headers. They are read-only in the portal: change the remote with PATCH /api/proxies/{name}, and set request headers as remote.headers when creating the repository with POST /api/proxies (chainsaw repo create has no header option).

Copy-paste client setup for each package manager is in How to Configure Your Package Manager to Use Chainsaw, and a new client credential’s setup snippet is shown when you create it under Settings → Client Credentials. Share those with your development teams to simplify onboarding.
Step 7: Understand Negative Caching
Chainsaw uses negative caching to prevent repeated 404 requests to upstream registries. When an upstream returns a 404:
- Chainsaw caches the negative result
- Subsequent requests for the same package return 404 immediately
- The cache expires after a configurable time
This reduces load on upstream registries and improves response times for packages that don’t exist.

Step 8: Format-Aware URL Rewriting
For some ecosystems (PyPI, Composer), upstream responses contain absolute URLs that point back to the original registry. Chainsaw automatically rewrites these URLs to point through the proxy, ensuring all subsequent requests stay on the Chainsaw path.
Supported Repository Formats
| Format | Upstream Default | Repository Path |
|---|---|---|
| npm | registry.npmjs.org | /repository/@default/npmjs/ |
| PyPI | pypi.org | /repository/@default/pypi/simple/ |
| Maven | repo1.maven.org | /repository/@default/maven-central/ |
| NuGet | api.nuget.org | /repository/@default/nuget-official/v3/index.json |
| Cargo | crates.io | /repository/@default/crates-io/ |
| Composer | packagist.org | /repository/@default/packagist/ |
| Go | proxy.golang.org | /repository/@default/gomod/ |
| Docker | registry-1.docker.io | /repository/@default/docker-hub/ |
| RubyGems | rubygems.org | /repository/@default/rubygems-official/ |
| APT | varies | /repository/@default/apt-main/ |
| Yum/DNF | varies | /repository/@default/yum-baseos/ |
| Hugging Face | huggingface.co | /repository/@default/huggingface/ |
| Homebrew | formulae.brew.sh (API) + ghcr.io (bottles) | /repository/@default/homebrew/ |
Next Steps
- How to Configure Your Package Manager to Use Chainsaw — Per-ecosystem configuration
- How to Manage Cache and Optimize Build Performance — Cache management and purging
- How to Create and Manage Client Credentials — Credential management for repository access