Struggling finding documentation around this that works with specific versions of Harbor and Helm.
Ive tried adding my repo...
Helm repo add harbor https://myharbor.mydomain.com/chartrepo/myproject --username myusername --password mypassword
No issues so far
Then I try to push a chart in the local directory (.tgz file)
Helm push myhelmchart.tgz harbor
I get an error 'Error: scheme prefix missing from remote (e.g. "oci://")'
If I try
Helm push myhelmchart.tgz oci://harbor
I get an error 'dial tcp: lookup harbor: no such host'
I tried
helm repo add harbor oci://myharbor.mydomain.com/chartrepo/myproject --username myusername --password
I get an error 'looks like oci://myharbor.mydomain.com/chartrepo/myproject is not a valid chart repository'
If I just try and push directly and not use a registered repo
helm push myhelmchart.tgz oci://myharbor.mydomain.com/chartrepo/myproject
I get and error 'Error: unexpected status: 401 Unauthorized'
If I login first...
helm registry login myharbor.mydomain.com/chartrepo/myproject
Username: myusername
Password: mypassword
Login Succeeded
The attempt to push again
helm push myhelmchart.tgz oci://myharbor.mydomain.com/chartrepo/myproject
Same error 'Error: unexpected status: 401 Unauthorized'
My goal is to be able to push helm charts into Harbor and have them show up in this area...

There are three options how helm charts can be pushed to Harbor
helm package and upload the tgz file via the Harbor UITo be safe for the future, I recommend you switch to option 3, as Chartmuseum is already marked as deprecated in Harbor.
helm registry login -u user container-registry.com
helm push harbor-1.7.4.tgz oci://container-registry.com/container-registry
helm pull oci://container-registry.com/container-registry/harbor --version 1.7.4
This is pulling to tgz file to your current directory.
Unlike with the common approach where you would first add a repo and the pull from it in order to be able to install a Chart you can do it all in one go with an OCI registry:
helm install myrelease oci://container-registry.com/container-registry/harbor --version 1.7.4
Same procedure for template and upgrade
The oci:// protocol is also available in various other subcommands.
Here is a complete list:
helm pull
helm show
helm template
helm install
helm upgrade
The Helm documentation has a page with more OCI related examples.
add harbor repo
helm repo add --username=username --password=xxxx myrepo https://harbor.xxxx.cn/chartrepo/xxxx
create chart
helm create xxxxxx
lint chart in chart dir
helm lint .
package chart in chart dir
helm package .
install push plugin
helm plugin install https://github.com/chartmuseum/helm-push
push chart to repo
helm cm-push xxxxxx-0.1.0.tgz myrepo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With