Skip to content
Latchkey

helm repo add: Register Chart Repos in CI

Register a chart repository so charts can be installed by name.

helm repo add records a chart repository under a local alias. In CI you add the repos a deploy depends on, then run helm repo update to refresh the index before installing. Private repos take --username/--password (or a token).

Common flags

  • NAME URL - alias and repository URL (positional)
  • --username / --password - credentials for private repos
  • --force-update - overwrite an existing repo entry
  • helm repo update - refresh indexes after adding

Example in CI

Add a repo, refresh, then install from it.

shell
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm upgrade --install pg bitnami/postgresql -n data

Common errors in CI

  • Error: repository name (X) already exists - add --force-update or skip
  • looks like "URL" is not a valid chart repository ... 404 - wrong URL or missing index.yaml
  • Error: ... 401 Unauthorized - private repo needs credentials

Key takeaways

  • Registers a chart repo so charts install by alias.
  • Run helm repo update after adding to refresh the index.
  • Use --force-update for idempotent re-runs in CI.

Related guides

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