diff --git a/helm/main.go b/helm/main.go index 32b890b..cedd079 100644 --- a/helm/main.go +++ b/helm/main.go @@ -155,7 +155,8 @@ func (h *Helm) PackagePush( if useNonOciHelmRepo { curlCmd := []string{ - `curl --variable %REGISTRY_USERNAME`, + `curl -f`, + `--variable %REGISTRY_USERNAME`, `--variable %REGISTRY_PASSWORD`, `--expand-user "{{REGISTRY_USERNAME}}:{{REGISTRY_PASSWORD}}"`, `-T`, @@ -277,7 +278,8 @@ func (h *Helm) doesChartExistOnRepo( pkgFile := fmt.Sprintf("%s-%s.tgz", name, version) // Do a GET of the chart but with response headers only so we do not download the chart curlCmd := []string{ - `curl --variable %REGISTRY_USERNAME`, + `curl`, // Do not use `-f` here because the returned http code is needed. + `--variable %REGISTRY_USERNAME`, `--variable %REGISTRY_PASSWORD`, `--expand-user "{{REGISTRY_USERNAME}}:{{REGISTRY_PASSWORD}}"`, opts.getChartFqdn(pkgFile),