helm/helm · error

could not find protocol handler for: %s

Error message

could not find protocol handler for: %s

What it means

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.

Source

Thrown at pkg/repo/v1/chartrepo.go:67

// ChartRepository represents a chart repository
type ChartRepository struct {
	Config    *Entry
	IndexFile *IndexFile
	Client    getter.Getter
	CachePath string
}

// NewChartRepository constructs ChartRepository
func NewChartRepository(cfg *Entry, getters getter.Providers) (*ChartRepository, error) {
	u, err := url.Parse(cfg.URL)
	if err != nil {
		return nil, fmt.Errorf("invalid chart URL format: %s", cfg.URL)
	}

	client, err := getters.ByScheme(u.Scheme)
	if err != nil {
		return nil, fmt.Errorf("could not find protocol handler for: %s", u.Scheme)
	}

	return &ChartRepository{
		Config:    cfg,
		IndexFile: NewIndexFile(),
		Client:    client,
		CachePath: helmpath.CachePath("repository"),
	}, nil
}

// DownloadIndexFile fetches the index from a repository.
func (r *ChartRepository) DownloadIndexFile() (string, error) {
	indexURL, err := ResolveReferenceURL(r.Config.URL, "index.yaml")
	if err != nil {
		return "", err
	}

	resp, err := r.Client.Get(indexURL,

View on GitHub (pinned to 2a29f1770b)

Solutions

  1. Use http(s) URLs for classic repositories: `helm repo add name https://charts.example.com`
  2. For OCI storage, skip repo add and reference charts directly: `helm install mychart oci://ghcr.io/user/mychart`
  3. Fix scheme typos (https:/ -> https://)
  4. When constructing Providers in code, include getter.All(helmcli) so http/https handlers are registered

Example fix

# before
helm repo add myrepo oci://ghcr.io/myuser

# after
helm install mychart oci://ghcr.io/myuser/mychart --version 1.0.0
Defensive patterns

Strategy: validation

Validate before calling

u, err := url.Parse(cfg.URL)
if err != nil {
	return err
}
switch u.Scheme {
case "http", "https":
	// ok for NewChartRepository
case "oci":
	return errors.New("oci:// is not a chart-repository protocol; use helm install/pull with the oci:// ref directly")
default:
	return fmt.Errorf("unsupported repository scheme %q", u.Scheme)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of helm/helm@2a29f1770b (2026-08-15). Data as JSON: /api/errors/2d82b006a1237cc4. Report an issue: GitHub.