{"record":{"id":"2d82b006a1237cc4","repo":"helm/helm","slug":"could-not-find-protocol-handler-for-s","errorCode":null,"errorMessage":"could not find protocol handler for: %s","messagePattern":"could not find protocol handler for: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/repo/v1/chartrepo.go","lineNumber":67,"sourceCode":"\n// ChartRepository represents a chart repository\ntype ChartRepository struct {\n\tConfig    *Entry\n\tIndexFile *IndexFile\n\tClient    getter.Getter\n\tCachePath string\n}\n\n// NewChartRepository constructs ChartRepository\nfunc NewChartRepository(cfg *Entry, getters getter.Providers) (*ChartRepository, error) {\n\tu, err := url.Parse(cfg.URL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid chart URL format: %s\", cfg.URL)\n\t}\n\n\tclient, err := getters.ByScheme(u.Scheme)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not find protocol handler for: %s\", u.Scheme)\n\t}\n\n\treturn &ChartRepository{\n\t\tConfig:    cfg,\n\t\tIndexFile: NewIndexFile(),\n\t\tClient:    client,\n\t\tCachePath: helmpath.CachePath(\"repository\"),\n\t}, nil\n}\n\n// DownloadIndexFile fetches the index from a repository.\nfunc (r *ChartRepository) DownloadIndexFile() (string, error) {\n\tindexURL, err := ResolveReferenceURL(r.Config.URL, \"index.yaml\")\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tresp, err := r.Client.Get(indexURL,","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/helm/helm/blob/2a29f1770b62844b27197d2507377361d45ad7c0/pkg/repo/v1/chartrepo.go#L49-L85","documentation":"NewChartRepository resolves a getter for the URL's scheme via getter.Providers.ByScheme. If no registered provider handles that scheme, construction fails. http/https are the supported repository protocols; oci is deliberately not a chart-repository protocol.","triggerScenarios":"Adding or using a repository whose URL scheme is oci:// (`helm repo add myrepo oci://ghcr.io/user` is unsupported); custom-built Providers that omit the http/https getter; typo schemes (httpss://) or missing '//' making the scheme unrecognizable; empty scheme from a bare path.","commonSituations":"Attempting to treat an OCI registry as a classic chart repository; embedding helm library code with a restricted getter.Providers list; scheme typos in repositories.yaml; file:// or custom schemes without matching getters registered.","solutions":["Use http(s) URLs for classic repositories: `helm repo add name https://charts.example.com`","For OCI storage, skip repo add and reference charts directly: `helm install mychart oci://ghcr.io/user/mychart`","Fix scheme typos (https:/ -> https://)","When constructing Providers in code, include getter.All(helmcli) so http/https handlers are registered"],"exampleFix":"# before\nhelm repo add myrepo oci://ghcr.io/myuser\n\n# after\nhelm install mychart oci://ghcr.io/myuser/mychart --version 1.0.0","handlingStrategy":"validation","validationCode":"u, err := url.Parse(cfg.URL)\nif err != nil {\n\treturn err\n}\nswitch u.Scheme {\ncase \"http\", \"https\":\n\t// ok for NewChartRepository\ncase \"oci\":\n\treturn errors.New(\"oci:// is not a chart-repository protocol; use helm install/pull with the oci:// ref directly\")\ndefault:\n\treturn fmt.Errorf(\"unsupported repository scheme %q\", u.Scheme)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never use oci:// URLs in `helm repo add`; reference OCI charts directly in install/pull","When embedding helm, build getters with getter.All(helmcli) so http/https are registered","Double-check scheme spelling and the // separator in repo URLs"],"tags":["url","scheme","getter","repository","oci"],"backgroundTag":null,"analyzedSha":"2a29f1770b62844b27197d2507377361d45ad7c0","analyzedAt":"2026-08-15T22:02:47.490Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}