helm init failed is not a valid chart repository or cannot be reached: Failed to fetch 403 Forbidden

前提是你 提交于 2021-01-26 19:41:58

问题


is not a valid chart repository or cannot be reached: Failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden

helm init start failing today, we are using helm version HELM_VERSION: v2.13.0 in our CI/CD.

Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com 
Error: Looks like "https://kubernetes-charts.storage.googleapis.com" 
is not a valid chart repository or cannot be reached: 
Failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden

While it was working fine a day ago. Here are the logs that I received while running init command.

$ helm init --client-only
Creating /root/.helm 
Creating /root/.helm/repository 
Creating /root/.helm/repository/cache 
Creating /root/.helm/repository/local 
Creating /root/.helm/plugins 
Creating /root/.helm/starters 
Creating /root/.helm/cache/archive 
Creating /root/.helm/repository/repositories.yaml 
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com 
Error: Looks like "https://kubernetes-charts.storage.googleapis.com" is not a valid chart repository or cannot be reached: Failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden

There are similar questions question but that seems different and also I am not behind a proxy like mentioned here.


回答1:


Since November 13, 2020, the new location for the stable repository is https://charts.helm.sh/stable and the new location for the incubator repository is https://charts.helm.sh/incubator.

Try:

helm init --stable-repo-url=https://charts.helm.sh/stable --client-only 

or

$ helm repo add stable https://charts.helm.sh/stable
$ helm repo update
Name Old Location New Location
stable https://kubernetes-charts.storage.googleapis.com https://charts.helm.sh/stable
incubator https://kubernetes-charts-incubator.storage.googleapis.com https://charts.helm.sh/incubator
  • Ref



回答2:


This fixed it for me:

helm repo add "stable" "https://charts.helm.sh/stable" --force-update


来源:https://stackoverflow.com/questions/65407317/helm-init-failed-is-not-a-valid-chart-repository-or-cannot-be-reached-failed-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!