After authenticating to GCP using gcloud
(which seems to store credentials in the Docker configuration) I am able to push a Helm chart to my Artifact Registry:
$ helm push my-appl-1.0.0.tgz oci://us-west1-docker.pkg.dev/my-gcp-project/docker-testing/charts
Pushed: us-west1-docker.pkg.dev/my-gcp-project/docker-testing/charts/my-appl:1.0.0
Digest: sha256:321ac1f93e52fc741e81c03a8509255fc34275ac52edb7a3677a459f6f80a6cd
However, I cannot get helm repo add
to work. I have tried this:
$ helm repo add gcp-ar https://us-west1-docker.pkg.dev/my-gcp-project/docker-testing
Error: looks like "https://us-west1-docker.pkg.dev/my-gcp-project/docker-testing" is not a valid chart repository or cannot be reached: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type repo.IndexFile
I also tried these with the same bad results:
helm repo add gcp-ar oci://us-west1-docker.pkg.dev/my-gcp-project/docker-testing
helm repo add gcp-ar oci://us-west1-docker.pkg.dev/my-gcp-project/docker-testing/charts
helm repo add gcp-ar https://us-west1-docker.pkg.dev/my-gcp-project/docker-testing/charts
How do I get an Artifact Registry Helm repo registered locally using "helm repo add"?
You don't need to treat OCI registries like traditional Helm repositories. They are simply two different types of indexed storage. You can use simple commands like
helm registry login
andhelm push oci://...
with OCI registries. They came from the Docker world. You can usehelm repo
commands to manage classical repositories.