{"record":{"id":"67fc00bfe98a0956","repo":"helm/helm","slug":"errmissingname","errorCode":"errMissingName","errorMessage":"no name provided","messagePattern":"no name provided","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/chart/v3/util/validate_name.go","lineNumber":39,"sourceCode":"\t\"fmt\"\n\t\"regexp\"\n)\n\n// validName is a regular expression for resource names.\n//\n// According to the Kubernetes help text, the regular expression it uses is:\n//\n//\t[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\n//\n// This follows the above regular expression (but requires a full string match, not partial).\n//\n// The Kubernetes documentation is here, though it is not entirely correct:\n// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nvar validName = regexp.MustCompile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`)\n\nvar (\n\t// errMissingName indicates that a release (name) was not provided.\n\terrMissingName = errors.New(\"no name provided\")\n\n\t// errInvalidName indicates that an invalid release name was provided\n\terrInvalidName = fmt.Errorf(\n\t\t\"invalid release name, must match regex %s and the length must not be longer than 53\",\n\t\tvalidName.String())\n\n\t// errInvalidKubernetesName indicates that the name does not meet the Kubernetes\n\t// restrictions on metadata names.\n\terrInvalidKubernetesName = fmt.Errorf(\n\t\t\"invalid metadata name, must match regex %s and the length must not be longer than 253\",\n\t\tvalidName.String())\n)\n\nconst (\n\t// According to the Kubernetes docs (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#rfc-1035-label-names)\n\t// some resource names have a max length of 63 characters while others have a max\n\t// length of 253 characters. As we cannot be sure the resources used in a chart, we\n\t// therefore need to limit it to 63 chars and reserve 10 chars for additional part to name","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/helm/helm/blob/2a29f1770b62844b27197d2507377361d45ad7c0/internal/chart/v3/util/validate_name.go#L21-L57","documentation":"ChartUploader.UploadTo (pkg/uploader/chart_uploader.go:47) requires the remote to carry a URL scheme because it dispatches to a pusher via c.Pushers.ByScheme(u.Scheme). url.Parse succeeds on bare hosts, so a scheme-less remote like registry.example.com/myrepo parses fine but has an empty Scheme, triggering this error which suggests the OCI form oci://.","triggerScenarios":"uploader.ChartUploader{...}.UploadTo(\"mychart-1.0.0.tgz\", \"registry.example.com/charts\") — Docker-style reference without a scheme. Any 'helm push chart.tgz <remote>' where <remote> lacks the oci:// prefix.","commonSituations":"Muscle memory from docker push / helm's legacy repo push where the remote was a repo name, not a URL; scripts upgraded from chart-repo (http) workflows to OCI registries without adding the scheme.","solutions":["Prefix the remote with oci:// — the full form is oci://<registry-host>/<path>","For non-OCI HTTP chart repos, use helm's repo/upload tooling that accepts a repo name instead of ChartUploader with a bare host","Validate the scheme before calling UploadTo and fail fast with a targeted message"],"exampleFix":"# before\nhelm push mychart-1.0.0.tgz registry.example.com/myrepo\n# after\nhelm push mychart-1.0.0.tgz oci://registry.example.com/myrepo","handlingStrategy":"validation","validationCode":"func remoteHasScheme(remote string) error {\n    u, err := url.Parse(remote)\n    if err != nil { return err }\n    if u.Scheme == \"\" { return fmt.Errorf(\"remote %q must include a scheme such as oci://\", remote) }\n    return nil\n}","typeGuard":null,"tryCatchPattern":"if err := c.UploadTo(ref, remote); err != nil && strings.Contains(err.Error(), \"scheme prefix missing\") {\n    remote = \"oci://\" + remote // only if host was bare by construction\n}","preventionTips":["Always push to oci://<registry-host>/<path>","Distinguish legacy chart-repo push (repo name) from OCI push (URL)","Default the scheme at the call site instead of relying on the error"],"tags":["uploader","push","oci","url-scheme","helm"],"backgroundTag":null,"analyzedSha":"2a29f1770b62844b27197d2507377361d45ad7c0","analyzedAt":"2026-08-15T22:02:47.490Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}