harbor: Failed to add the chart repo
Expected behavior and actual behavior: Got following error messages when trying to add the chart repo:
Error: looks like "<harbor server>" 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
Steps to reproduce the problem:
helm repo add myrepo <harbor server>
Versions: Please specify the versions of following systems.
- harbor version: v2.0.2-e91b4ff1
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 6
- Comments: 36 (2 by maintainers)
With Helm 3.7 deprecating
helm chartcommands, this hotfix no longer works. I am desperately searching for any way to push and pull charts with Harbor and Helm 3.7.I can login with Docker and pull images just fine. But when trying to add the repo, I see the following (even if I try oci:// or no https://)
helm repo add mychart https://harbor.company.com/myproject/mychartSimply pulling the chart by absolute path gives the same error.
helm pull mychart https://harbor.company.com/myproject/mychartI can have people downgrade their Helm installation to deal with this, but it’s not a great longterm solution.
I’m seeing the same thing. I can login and push a chart but can’t pull that chart.
Error: looks like "https://myharborinstance.us/helm" 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@will-beta I read the harbor doc, and find that the command
helm repo addis wrong,we should use the commands as below :from office doc, you can search
OCI-Compatiblewords, you will find it.I try this without
chartmuseumandnotaryservice, and it works well.The only thing to note that the OCI Helm Charts only support https when push harts. https://github.com/helm/helm/issues/6324.
If you use Self-signed certificate , you can append your ca file to
/etc/pki/tls/certs/ca-bundle.crt(for centos), use command like :cat self-signed.ca >>/etc/pki/tls/certs/ca-bundle.crt.and there is no options for
helm chart pushto add your own ca certificate.Thats solve for me, have the same issue.
In my ci/cd workflow i changed the mode for deploy. Instead use helm repo add. I pull the package.
Example: ` - helm registry login https://harbor.url/repository --username admin --password ${{ secrets.HARBOR_PASS }}
And so i can install or upgrade
I had issues with Helm 3.8 on Harbor 2.2 and while i was able to use
helm package ... helm pushpulling those pacakges back was a problem till i changed thehttps://protocol on my chart depndencies to oci:// as shown;This appears to work.
So my full flow is (in gitlab-ci stages)
And then reference it with;
When will this issue be fixed? We do not want to use helm in version 3.6.x for this to work.