helm / community

Helm community content
https://helm.sh
421 stars 179 forks source link

How can i use "helm push" command to a http registry like harbor #351

Closed mumong closed 4 months ago

mumong commented 4 months ago

hi, i am using docker to deploy harbor, and my harbor only support for login using http ways.

now i need to push helm chart to my harbor.

first i login my harbor like helm registry login xxx.xxx:5000 -u admin -p Haxxx45 --insecure and it feed ok

WARNING: Using --password via the CLI is insecure. Use --password-stdin.

Login Succeeded

then i try to push oci chart to harbor registry helm push redis-19.5.5.tgz --debug oci://xxx20.23xxx/test --insecure-skip-tls-verify i got error

WARN[0000] reference for unknown type: application/vnd.cncf.helm.chart.content.v1.tar+gzip WARN[0000] reference for unknown type: application/vnd.cncf.helm.config.v1+json DEBU[0000] checking and pushing to url="https://xxx/v2/test/redis/blobs/sha256:63ad2ef33f65ba1cea8207a671e1deb94e536d44f7c499a4542daf524e792fa0" DEBU[0000] do request request.header.accept="application/vnd.cncf.helm.chart.content.v1.tar+gzip, /" request.header.user-agent=Helm/3.15.2 request.method=HEAD url="https://xxx5/v2/test/redis/blobs/sha256:63ad2ef33f65ba1cea8207a671e1deb94e536d44f7c499a4542daf524e792fa0" DEBU[0000] checking and pushing to url="https://xxx5/v2/test/redis/blobs/sha256:e1e768b66af97d60958893118c6d2f3b6ff4e511f5695bb63886abc9f5d0d741" DEBU[0000] do request request.header.accept="application/vnd.cncf.helm.config.v1+json, /" request.header.user-agent=Helm/3.15.2 request.method=HEAD url="https://xxx85/v2/test/redis/blobs/sha256:e1e768b66af97d60958893118c6d2f3b6ff4e511f5695bb63886abc9f5d0d741" Error: failed to do request: Head "https://xxx85/v2/test/redis/blobs/sha256:e1e768b66af97d60958893118c6d2f3b6ff4e511f5695bb63886abc9f5d0d741": dial tcp 17xxx8.1xx5:443: connect: no route to host helm.go:84: [debug] failed to do request: Head "https://xxx85/v2/test/redis/blobs/sha256:e1e768b66af97d60958893118c6d2f3b6ff4e511f5695bb63886abc9f5d0d741": dial tcp 172.2xxx85:443: connect: no route to host

any simple way that i can push oci to my harbor using http?

mumong commented 4 months ago

root@XNET-051:/home/huhu/project/chart# helm version version.BuildInfo{Version:"v3.15.2", GitCommit:"1a500d5625419a524fdae4b33de351cc4f58ec35", GitTreeState:"clean", GoVersion:"go1.22.4"}

mumong commented 4 months ago

sorry, solved by adding --plain-http root@XNET-051:/home/huhu/project/chart# helm push redis-19.5.5.tgz oci://1xxxx5:5000/test --plain-http Pushed: 17xxxxx5:5000/test/redis:19.5.5 Digest: sha256:aa805220832276c8754f6a0ab444034fc73289f6809a79b199407a4d97aa20ac