# Fix "failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden" in a Helm Chart's Dependencies

Yes. An agent points every dependency at the archived stable repository, regenerates the lock file and shows helm dependency update succeeding.

[Run this on Rush](https://cloud.getrush.ai/run/fix-kubernetes-charts-storage-googleapis-com-403-forbidden/helm/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent starts from the chart's own files, because the retired address can be declared in more than one place. In a chart like the one under `ops/charts/iris` in linkedin/iris, `Chart.yaml` has `name: iris`, `version: 0.0.1`, `appVersion: 0.0.14` and no `apiVersion` line, and `requirements.yaml` has a `dependencies` list with one entry: `mysql`, version `0.2.6`, repository `https://kubernetes-charts.storage.googleapis.com/`. `requirements.lock` records that repository with a digest generated in April 2017. The chart's README says to run `helm dependency build` and then `helm install`.

Then it reproduces the failure with the chart alone, no cluster needed. `helm dependency update` in that directory prints `Getting updates for unmanaged Helm repositories...`, then `Unable to get an update from the "https://kubernetes-charts.storage.googleapis.com/" chart repository: failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden`, and ends with `Error: no cached repository for helm-manager-… found. (try 'helm repo update')`. A `HEAD` request to that `index.yaml` answers 403 on its own. Helm 3.19 knows the address: `helm repo add stable https://kubernetes-charts.storage.googleapis.com` answers `Error: repo "https://kubernetes-charts.storage.googleapis.com" is no longer available; try "https://charts.helm.sh/stable" instead`, which names the fix.

The agent checks that the pinned version still exists before changing anything: the archive's `index.yaml` at `https://charts.helm.sh/stable` lists `mysql-0.2.6.tgz`. It then replaces the repository in `requirements.yaml` and runs `helm dependency update` again. That prints `Successfully got an update from the "https://charts.helm.sh/stable" chart repository`, `Downloading mysql from repo https://charts.helm.sh/stable`, saves `charts/mysql-0.2.6.tgz`, and rewrites `requirements.lock` with the new repository, a new digest and a new `generated` time. The repository's `.gitignore` does not exclude `charts/`, so the agent leaves the downloaded archive out of the commit and says so.

`helm lint` runs before and after so the pull request separates this fix from what the chart already had. Before, lint reports the missing dependency as a warning; after, that warning is gone. Three findings stay the same on both sides: `Chart.yaml: apiVersion is required`, `extensions/v1beta1 Deployment is deprecated in v1.8+, unavailable in v1.16+; use apps/v1 Deployment`, and `a Deployment must contain matchLabels or matchExpressions`. `helm template` renders the chart with the mysql subchart included. The agent lists those three in the pull request as separate work rather than folding a template rewrite into a repository fix.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "helm dependency update in our chart directory fails with \"failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden\". Read Chart.yaml, requirements.yaml and requirements.lock, find every reference to that retired repository, check that each pinned dependency version still exists in the archived index at https://charts.helm.sh/stable, point the references there, and run helm dependency update and helm lint before and after. Open a pull request with the changed files and the regenerated lock file, quoting both outputs. Do not commit downloaded chart archives, and list any lint finding that exists before your change as separate work.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

A pull request that changes the repository line in `requirements.yaml` and replaces `requirements.lock` with the one `helm dependency update` writes. The description quotes the 403 output from before the change, the successful update from after it, and the line of the archive index that proves the pinned mysql version is still served.

A reviewer checks that the lock file's `version` is unchanged, that the downloaded `.tgz` is not in the diff, and that the pull request's list of pre-existing `helm lint` findings matches what they see on the main branch. Nothing in the templates changes, so there is no rendering diff to review beyond the subchart now being present.

If the pinned version had been missing from the archive, the agent would stop there and report the versions the archive does have, since picking a new chart version changes what gets deployed and is a decision for the team.

## Run it on every chart repository in the org

The retired address sits in lock files that nobody reads until a dependency build fails, so the useful unit is every repository that holds a chart. From a list of repositories, your server sends this request once per repository with its own UUID as `request_id`, so a retry returns the run it already started, and reads each result from the `run.completed` webhook. A key starts at most `max_concurrent` runs at once and queues the rest.

To catch the failure when it happens instead, an automation with a `github` trigger on `pull_request.opened` and `pull_request.synchronize` runs this prompt on every chart change, with the event appended after the prompt, and opens a fix on its own branch when a dependency build fails.

## Why run it on Rush?

The fix is small, but the proof needs a Helm binary, network access to two chart indexes and a lock file regenerated by the tool rather than by hand. In a Rush sandbox the agent installs Helm, runs the failing command and the fixed one, and every line of output is kept with the run, so the pull request quotes the 403 and the successful download rather than describing them.

A chart that has not been built in years usually carries other debt, like a missing `apiVersion` or a `Deployment` on a removed API group. The agent runs `helm lint` on both sides of its change and reports what was already there, so the reviewer sees exactly one fix and a list of what remains, instead of a pull request that quietly rewrites templates.

## Frequently asked questions

### Why does the old address answer 403 instead of redirecting?

The bucket behind `kubernetes-charts.storage.googleapis.com` no longer serves the index; a request for `index.yaml` gets `403 Forbidden`. Helm 3.19 recognises the address and tells you to use `https://charts.helm.sh/stable` when you try to add it as a repository.

### Will the same chart version still be there?

The agent checks before changing anything. The archive index at `https://charts.helm.sh/stable` lists every version the stable repository had, and the pull request quotes the line for your pinned version. If it were absent, the run reports the versions that exist and stops.

### Does this change what gets deployed?

No. The dependency name and version stay the same, and the lock file records the same version with a new digest and repository. The downloaded archive is not committed, so a `helm dependency build` on the branch fetches the identical chart.

### What about requirements.yaml versus Chart.yaml dependencies?

Whichever the chart has, and both when both exist. Helm reads `requirements.yaml` for an `apiVersion: v1` chart, which is where the iris chart declares its one dependency, and the `dependencies` block of `Chart.yaml` for v2; a chart with no `apiVersion` line is flagged by `helm lint` either way, and the agent reports that finding separately.

## More Helm jobs

- [Fix Helm Errors from Sentry Alerts](https://getrush.ai/run/fix-sentry-errors/helm/)
- [Investigate Prometheus Running Out of Memory](https://getrush.ai/run/investigate-prometheus-oom/helm/)
- [Publish a Helm Chart to an OCI Registry](https://getrush.ai/run/publish-chart-to-oci/helm/)

## More jobs like this: Fix a bug from an alert

- [Fix "# Warning: 'bases' is deprecated. Please use 'resources' instead" Across a Kustomize Repository](https://getrush.ai/run/fix-kustomize-bases-is-deprecated/kustomize/)
- [Fix "TypeError: mfcc() takes 0 positional arguments but 2 were given" in librosa](https://getrush.ai/run/fix-librosa-mfcc-takes-0-positional-arguments/librosa/)
- [Fix "SetuptoolsDeprecationWarning: License classifiers are deprecated" and "project.license as a TOML table is deprecated"](https://getrush.ai/run/fix-license-classifiers-are-deprecated/setuptools/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
