Code Review

Private registries

Give Solidafy Code Review read access to your private package and chart registries, so reviews can see the real API of your private dependencies and render Helm charts that pull private charts. This page lists what's supported and how to add a credential.

Why add a registry credential

During a review, the reviewers look up the libraries your code imports so they can check calls against real signatures and docs, and they render Helm charts to judge the manifests those charts actually produce. Public packages and charts work without any setup. Private ones need a credential.

Without one, nothing breaks: a private dependency is treated as unverified (the reviewer gets a hint that it couldn't be looked up, rather than its real API), and a Helm chart with a private dependency renders as unverified. Reviews still run and post findings. Adding a credential just makes those parts of the review more precise.

What's supported

EcosystemWhere the private registry is declared in your repositoryHow the credential is sent
npm (GitHub Packages, Artifactory, Nexus, Verdaccio, any registry with the standard npm API)An .npmrc scope mapping, for example @your-org:registry=https://npm.pkg.github.comBearer token
Python (any PEP 503 "simple" index: devpi, Artifactory, Nexus, AWS CodeArtifact, Google Artifact Registry, Azure Artifacts)An index URL in pip.conf or pip.ini (--index-url / --extra-index-url), [[tool.uv.index]] in pyproject.toml, or [[tool.poetry.source]]HTTP Basic (username and token)
Maven and Gradle (for example Nexus, Artifactory, GitHub Packages)A repository or mirror URL in pom.xml or settings.xml, or a Gradle maven { url ... } blockHTTP Basic (username and token)
NuGet (for example Azure Artifacts, Artifactory, GitHub Packages)A v3 feed under <packageSources> in nuget.configHTTP Basic (username and token)
Cargo alternative registriesA sparse registry under [registries] in .cargo/config.toml, used by a dependency with registry = "<name>" in Cargo.tomlThe token as-is
Go modules (a private repository on GitHub, GitHub Enterprise, GitLab or Gitea, or a module proxy such as Athens, Artifactory or Nexus)GOPRIVATE, GONOPROXY or GOPROXY as your tracked build files set them, for example in a Makefile or a Dockerfile ENVHTTP Basic (username and token)
Elixir (a Hex organisation, or a self-hosted Hex mirror)organization: or repo: on a dependency in mix.exs, or a hex: [mirror_url: ...] entry in its project configThe key as-is
Swift packages (a private repository, a non-GitHub git host, or a SwiftPM package registry)A .package(url:) or .package(id:) entry in Package.swift, resolved in Package.resolvedHTTP Basic (username and token)
Helm chart dependencies on any OCI registry (ghcr.io or your own)An oci://... dependency in Chart.yamlRegistry login (username and token)

The reviewer finds the private host from these files in the repository under review, then uses the credential you stored for exactly that host. For Maven, only the first private repository a project declares is used. For Python, the private index is tried only after the public one has nothing, because a private Python index is usually a mirror of PyPI rather than a separate set of packages. A Helm chart dependency on an https:// chart repository is fetched without a credential, so a chart repository that needs a login can't be rendered.

Each credential is presented once, in the one scheme its ecosystem's own tooling sends, and never retried in another scheme if the registry rejects it, so your token is never shown to the same host twice.

Rules for the registry itself:

  • It must be served over HTTPS. A plain http:// registry or chart repository is never contacted.
  • It must be reachable from the public internet. Hosts on private or internal networks are never contacted.
  • Redirects are followed, up to three hops, and only to public HTTPS hosts. Your credential is sent only while the request stays on the host you stored it for: once a redirect leaves that host, the credential is dropped for the rest of the request.

Add a credential

  1. In the portal, open Settings > Code Review and pick the Registry credentials tab. (It opens once the GitHub connection is ready.)
  2. Fill in:
    • Registry host: the bare hostname, for example npm.pkg.github.com or nexus.example.com. No https:// and no path. If the registry runs on a non-standard port, include it: nexus.example.com:8443.
    • Registry username: the username the registry expects with the token.
    • Registry token: a personal access token, robot token or API key with read access.
  3. Click Add registry.

The configured registries are listed with their host and username. The token is write-only: it's stored encrypted, never shown again, and never returned by the portal. To change a token, add the same host again with the new token; it replaces the old one. To remove one, click Remove next to it (removing needs the admin role).

You can add as many registries as you need, one per host.

Check a credential

Each configured registry has a Check button, so you don't have to wait for a review to find out whether a credential works. For a GitHub token, the check asks GitHub whether the token is still valid, which catches a mistyped, truncated, expired or revoked one. A good answer usually reads Token works, this registry unconfirmed: the token is live, but a valid token can still be refused by a particular registry (npm on GitHub Packages takes classic tokens only), and only a review that actually reads from that registry settles it. Nothing needs fixing when you see it. For a registry that isn't on GitHub, the check can't tell whether the credential works.

GitHub Packages

GitHub issues one token for all of its own hosts, so one credential covers all of them. Store a credential for any of these and the reviewer also tries it for the rest when they have no credential of their own:

  • ghcr.io and the superseded docker.pkg.github.com, for Helm charts and container images
  • npm.pkg.github.com, maven.pkg.github.com, nuget.pkg.github.com and rubygems.pkg.github.com, for packages
  • github.com and api.github.com, which is where a private Go module or a private SwiftPM dependency is fetched from

A credential stored for a specific host always wins over one borrowed from a sibling, and if you've stored several, the ghcr.io one is tried first. A credential is never reused for a host outside this GitHub family, so your Nexus can never be handed your Artifactory token.

Sharing a credential across those hosts does not mean every GitHub token is accepted by every one of them, because the accepted token type differs. ghcr.io takes a classic personal access token with read:packages or a fine-grained one, while GitHub documents npm.pkg.github.com as taking only a classic token with read:packages and rejects a fine-grained one with a 401. A classic read:packages token is therefore the one to store: it works everywhere in the list. For the username, use the GitHub username the token belongs to.

Warning: A fine-grained token stored for ghcr.io and borrowed for npm.pkg.github.com is rejected there, even though it works for your charts. GitHub App installation tokens don't work for any GitHub Packages registry.

When a credential stops working

If a registry rejects a stored credential during a review, Registry credentials shows an Authentication failing notice for that host, with the reason the registry gave (when there is one) and when it was last checked. For a GitHub Packages host it also reminds you that a classic read:packages token is needed.

The notice is shown under the host that rejected the credential, which can be a host you never stored a credential for directly (for example npm.pkg.github.com rejecting a borrowed ghcr.io token). Fix it by adding a working credential for that host. The notice clears after the next successful use.

If the registry accepts the token but still refuses the read, the notice says Access missing instead. The token itself is fine, so replacing it won't help: what's missing is a permission, either a scope such as read:packages or access to that package or organisation.

A rejected credential is not the only thing that can go wrong, and the page tells them apart. If a lookup couldn't be made at all, so your credential was never presented, the host is shown as Not verified rather than as failing. That one is ours to fix, not yours: the review carries on with the public information it has, and its summary comment says that private dependencies couldn't be resolved for it, so you learn it from the pull request instead of having to come and look here.

A check that started and got no answer shows Check did not finish. Nothing was established either way, so try it again.

Example: private npm packages on GitHub Packages

Your repository has an .npmrc like this:

text
@acme:registry=https://npm.pkg.github.com

To let reviews read the API of @acme/* packages:

  1. On GitHub, create a classic personal access token with only the read:packages scope, from an account that can read those packages.
  2. In Registry credentials, add:
    • Registry host: npm.pkg.github.com
    • Registry username: that account's GitHub username
    • Registry token: the token, for example ghp_...
  3. Click Add registry.

The next review that touches code importing @acme/* uses the real type declarations of those packages.