# helm repo update: Command Reference for CI/CD

> Reference for helm repo update: refresh local chart-repo indexes so installs resolve the latest versions, targeting specific repos, and a CI ordering example.

Source: https://latchkey.dev/learn/command-reference/helm-repo-update-command-cli-reference  
Updated: 2026-06-26

Refresh local repo indexes so Helm sees the latest charts.

helm repo update fetches the latest index for your registered repositories so install and dependency resolution pick up new chart versions. This reference covers it and where it belongs in a CI sequence.

## Common flags and usage

- repo update: refresh the index for all registered repos
- repo update <name> [<name>...]: refresh only named repos
- --fail-on-repo-update-fail: fail if any repo refresh fails
- Run after repo add and before install or dependency update
- repo list shows what is currently registered

## Example

```shell
helm repo add bitnami https://charts.bitnami.com/bitnami --force-update
helm repo update bitnami
helm dependency update ./charts/web
```

## In CI

A stale index resolves an old chart version; run repo update after adding repos and before any install or dependency build. Pass --fail-on-repo-update-fail so a transient repo outage fails the step loudly instead of silently using a cached index.

## Using this in CI

A runner has no kubeconfig, no cached context, and no interactive auth. Every kubectl invocation in CI needs the context supplied explicitly, and most confusing CI failures here are the command running against the wrong cluster or no cluster at all.

```Terminal
# never rely on the ambient context on a runner
kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pods

# confirm what you are actually connected to before mutating anything
kubectl config current-context
kubectl cluster-info

# fail fast instead of hanging on an unreachable API server
kubectl --request-timeout=30s get nodes
```

> Always set `--request-timeout` in CI. Without it an unreachable API server hangs until the job times out, which turns a thirty-second failure into a twenty-minute one.

## FAQ

### helm repo update: Command Reference for CI/CD?

helm repo update fetches the latest index for your registered repositories so install and dependency resolution pick up new chart versions. This reference covers it and where it belongs in a CI sequence.

### In CI?

A stale index resolves an old chart version; run repo update after adding repos and before any install or dependency build. Pass --fail-on-repo-update-fail so a transient repo outage fails the step loudly instead of silently using a cached index.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
