diff --git a/pkg/uploader/chart_uploader.go b/pkg/uploader/chart_uploader.go index d7e940406..1ed68d83c 100644 --- a/pkg/uploader/chart_uploader.go +++ b/pkg/uploader/chart_uploader.go @@ -24,6 +24,7 @@ import ( "helm.sh/helm/v3/pkg/pusher" "helm.sh/helm/v3/pkg/registry" + "strings" ) // ChartUploader handles uploading a chart. @@ -49,6 +50,12 @@ func (c *ChartUploader) UploadTo(ref, remote string) error { return fmt.Errorf("scheme prefix missing from remote (e.g. \"%s://\")", registry.OCIScheme) } + // See: https://github.com/helm/helm/issues/12728 + path := strings.SplitN(u.Path, ":", 2) + if len(path) > 1 { + return fmt.Errorf("Version tag \"%s\" need not be passed for remote", path[1]) + } + p, err := c.Pushers.ByScheme(u.Scheme) if err != nil { return err