mirror of https://github.com/helm/helm
https://github.com/helm/helm/issues/9977 Repos that have URL-encoded characters in the path cause the "helm install" command to fail. For example: ``` "purelb" has been added to your repositories Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "purelb" chart repository Update Complete. ⎈ Happy Helming!⎈ install.go:158: [debug] Original chart version: "" install.go:160: [debug] setting version to >0.0.0-0 Error: failed to fetch https://gitlab.com/api/v4/projects/purelb/purelb/packages/helm/stable/charts/purelb-v0.0.0-open-source-helm-chart-latest.tgz : 404 Not Found helm.go:75: [debug] failed to fetch https://gitlab.com/api/v4/projects/purelb/purelb/packages/helm/stable/charts/purelb-v0.0.0-open-source-helm-chart-latest.tgz : 404 Not Found helm.sh/helm/v3/pkg/getter.(*HTTPGetter).get /home/circleci/helm.sh/helm/pkg/getter/httpgetter.go:72 helm.sh/helm/v3/pkg/getter.(*HTTPGetter).Get /home/circleci/helm.sh/helm/pkg/getter/httpgetter.go:40 helm.sh/helm/v3/pkg/downloader.(*ChartDownloader).DownloadTo /home/circleci/helm.sh/helm/pkg/downloader/chart_downloader.go:97 helm.sh/helm/v3/pkg/action.(*ChartPathOptions).LocateChart /home/circleci/helm.sh/helm/pkg/action/install.go:738 main.runInstall /home/circleci/helm.sh/helm/cmd/helm/install.go:170 main.newInstallCmd.func1 /home/circleci/helm.sh/helm/cmd/helm/install.go:117 github.com/spf13/cobra.(*Command).execute /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 github.com/spf13/cobra.(*Command).ExecuteC /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 github.com/spf13/cobra.(*Command).Execute /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864 main.main /home/circleci/helm.sh/helm/cmd/helm/helm.go:74 runtime.main /usr/local/go/src/runtime/proc.go:203 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1357 ``` Note that the "purelb%2Fpurelb" in the original repo URL has been un-escaped and is now "purelb/purelb". It turns out that the golang net/url package gets confused if the Path and RawPath fields diverge, and it looks like it throws away RawPath. That's speculation on my part. In any case, setting *both* Path and RawPath keeps the URL-encoding. Signed-off-by: Chilton Cabot <toby@acnodal.io> Signed-off-by: toby cabot <toby@acnodal.io>pull/10020/head
parent
efe2638f87
commit
071646cc6c
@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
entries:
|
||||||
|
foo:
|
||||||
|
- name: foo
|
||||||
|
description: Foo Chart With URL-Encoded Path
|
||||||
|
home: https://helm.sh/helm
|
||||||
|
keywords: []
|
||||||
|
maintainers: []
|
||||||
|
sources:
|
||||||
|
- https://example.com/path%2fpath
|
||||||
|
urls:
|
||||||
|
- charts/foo-1.2.3.tgz
|
||||||
|
version: 1.2.3
|
||||||
|
checksum: 0e6661f193211d7a5206918d42f5c2a9470b737d
|
||||||
|
apiVersion: v2
|
Loading…
Reference in new issue