helm: helm 3.13.0 helm pull fails with 401 unauthorized

helm pull on oci artifact fails with 401 unauthorized error with 3.13.0. The chart is hosted on azure container registry and anonymous pull is enabled on this repository. The same command worked with previous helm version 3.12.3.

Command: helm pull oci://xxxxxxxx.azurecr.io/charts/xxxxx --version xxxxxxx --untar

Error Response: Error: unexpected status from HEAD request to https://xxxxxxxxxxx.azurecr.io/v2/charts/xxxxxxxxxx/manifests/xxxxxxxx: 401 Unauthorized

Output of helm version: version.BuildInfo{Version:“v3.13.0”, GitCommit:“825e86f6a7a38cef1112bfa606e4127a706749b1”, GitTreeState:“clean”, GoVersion:“go1.20.8”}

Output of kubectl version: Client Version: version.Info{Major:“1”, Minor:“27”, GitVersion:“v1.27.2”, GitCommit:“7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647”, GitTreeState:“clean”, BuildDate:“2023-05-17T14:20:07Z”, GoVersion:“go1.20.4”, Compiler:“gc”, Platform:“linux/amd64”} Kustomize Version: v5.0.1 Server Version: version.Info{Major:“1”, Minor:“26”, GitVersion:“v1.26.6”, GitCommit:“11902a838028edef305dfe2f96be929bc4d114d8”, GitTreeState:“clean”, BuildDate:“2023-06-19T16:11:29Z”, GoVersion:“go1.19.10”, Compiler:“gc”, Platform:“linux/amd64”}

Cloud Provider/Platform (AKS, GKE, Minikube etc.): AKS

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 13
  • Comments: 25 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Please reopen this issue, it’s not fixed in 3.13.1.

$ helm registry login xxx.azurecr.io
Username: helmtoken
Password: 
Login Succeeded

$ helm template postgres oci://xxx.azurecr.io/helm/postgres
Error: unexpected status from HEAD request to https://xxx.azurecr.io/v2/helm/postgres/manifests/0.1.0: 401 Unauthorized

$ helm version
version.BuildInfo{Version:"v3.13.1", GitCommit:"3547a4b5bf5edb5478ce352e18858d8a552a4110", GitTreeState:"clean", GoVersion:"go1.20.8"}

$ tar xzvf ~/Downloads/helm-v3.12.3-linux-amd64.tar.gz linux-amd64/helm
linux-amd64/helm

$ sudo mv -v linux-amd64/helm `which helm`
renamed 'linux-amd64/helm' -> '/usr/local/bin/helm'

$ helm template postgres oci://xxx.azurecr.io/helm/postgres > /dev/null
Pulled: xxx.azurecr.io/helm/postgres:0.1.0
Digest: sha256:324b81d6489072063dc4e2a7c1ddc22eaab2408b137ed7cdf3c60b51722dfd16

$ helm version
version.BuildInfo{Version:"v3.12.3", GitCommit:"3a31588ad33fe3b89af5a2a54ee1d25bfe6eaa5e", GitTreeState:"clean", GoVersion:"go1.20.7"}

for the time being install the previous version.

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh --version v3.12.3

Downgrading to 3.12.3 works for me.

Culprit appears to be #12237, reverting this makes it work again.

Helm 3.13.1 is now released with the fix: https://github.com/helm/helm/releases/tag/v3.13.1

Please update and try again. Thanks for the patience while we got the fix together.

Is there any ETA for when this fix will make it into a release?

@SoujanyaMangipudi Thanks for catching this and reporting it so quickly

Thanks @hiddeco for the PR, we will look to get this tested/merged/released ASAP.