helm: Can't push a chart to registry

I’m trying tu push a chart to registry, but i’m getting this error:

helm push cacheserver-core-chart-3.16.0.tgz https://.../sre --debug
Error: scheme prefix missing from remote (e.g. "oci://")
helm.go:84: [debug] scheme prefix missing from remote (e.g. "oci://")
helm.sh/helm/v3/pkg/uploader.(*ChartUploader).UploadTo
        helm.sh/helm/v3/pkg/uploader/chart_uploader.go:49
helm.sh/helm/v3/pkg/action.(*Push).Run
        helm.sh/helm/v3/pkg/action/push.go:69
main.newPushCmd.func1
        helm.sh/helm/v3/cmd/helm/push.go:48
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.3.0/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.3.0/command.go:974
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.3.0/command.go:902
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
        runtime/proc.go:255
runtime.goexit
        runtime/asm_amd64.s:1581

Output of helm version: version.BuildInfo{Version:“v3.8.0”, GitCommit:“d14138609b01886f544b2025f5000351c9eb092e”, GitTreeState:“clean”, GoVersion:“go1.17.5”}

If i try to use http:// or https:// scheme, then i get error like:

Error: scheme "https" not supported

If i use repo name, then i get oci error:

#helm repo list
NAME                    URL
sre                     https://..../sre
#helm push cacheserver-core-chart-3.16.0.tgz sre --debug
Error: scheme prefix missing from remote (e.g. "oci://")

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 15 (4 by maintainers)

Most upvoted comments

helm push command is not working instead of that, I used “cm-push”

Install the Plugin: $ helm plugin install https://github.com/chartmuseum/helm-push

Push a chart to your favorite repository, $ helm cm-push ./myhelm-chart helmchartmuseum

Ref: https://github.com/chartmuseum/helm-push

Thanks!

Same issue with helm 3.10.0

NAME       	URL                                                 
bitnami    	https://charts.bitnami.com/bitnami                  
my-charts	https://jfrog.domain.com/artifactory/my-charts

helm push helm-charts/test-chart-0.1.0.tgz my-charts
Error: scheme prefix missing from remote (e.g. "oci://")

Not sure if it’s related, but I can’t get cm-push to work either:

helm cm-push --ca-file cert.pem test-chart.tgz -u user -p password my-charts
frog.host.com/artifactory/my-charts
Pushing test-charts-0.1.0.tgz to https://jfrog.host.com/artifactory/my-charts...
Error: 404: could not properly parse response JSON: 404 page not found

I had the same problem after upgrading to helm 3.10.2 and it seems the ChartMuseum plugin in it’s recent version (installed as helm plugin install https://github.com/chartmuseum/helm-push) is needed and then helm cm-push ... is the command. In Gitlab-CI this looks like so:

helm-package:
  stage: build
  image:
    name: alpine/helm:3.10.2
    entrypoint: [""]
  variables:
    CHART: chart
  before_script:
    - apk add git
    - helm plugin install --version=v0.10.3 https://github.com/chartmuseum/helm-push.git
    - >
      helm repo add ${CHART}
      --username ${CI_REGISTRY_USER}
      --password ${CI_REGISTRY_PASSWORD}
      ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable
  script:
    - helm package ${CHART} -d ${CHART}
    - helm cm-push ${CHART}/*.tgz ${CHART}