Skip to content
Latchkey

helm repo add: Command Reference for CI/CD

Register a chart repository so Helm can pull from it.

helm repo add registers a named chart repository for later install, pull, and dependency resolution. This reference covers the auth and force-update flags and the CI ordering that matters before a dependency build.

Common flags and usage

  • repo add <name> <url>: register a repository
  • --username / --password: authenticate a private repo
  • --force-update: overwrite an existing entry with the same name
  • --pass-credentials: send credentials on all domains (use carefully)
  • Follow with helm repo update to fetch the latest index

Example

shell
helm repo add bitnami https://charts.bitnami.com/bitnami \
  --force-update
helm repo add internal https://charts.example.com \
  --username ci --password ${{ secrets.HELM_REPO_TOKEN }} \
  --force-update
helm repo update

In CI

Use --force-update so re-adding a repo on a cached runner does not error on a name clash. Add every repo a chart depends on before helm dependency update or helm dependency build, and pass private-repo credentials from the CI secret store.

Key takeaways

  • --force-update makes repo add idempotent on cached runners.
  • Add all required repos before a dependency build.
  • Pass private-repo credentials from the CI secret store, not inline.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →