Sub topic 13
Troubleshooting push and pull failures
This chapter assumes you can package a chart, log in with helm registry login, and push and pull with oci:// references. It covers the errors you are most likely to hit and how to find the cause of each.
A working model of where failures happen
A push or pull passes through four stages. Each stage fails in its own way, so locating the stage narrows the cause quickly.
Reference errors
The reference is checked before any network call. Two mistakes cause most of these errors.
- Including the chart name on push.
helm pushappends the chart name itself. Push tooci://registry.example.com/charts, notoci://registry.example.com/charts/myapp. Otherwise the chart lands atcharts/myapp/myapp. - Putting the version in the URL on pull. The version goes in
--version. A reference such asoci://registry.example.com/charts/myapp:0.1.0is wrong forhelm pullandhelm install.
Also check the scheme. A reference without oci:// is treated as a name from a classic repository.
# Wrong: version in the URL
helm pull oci://registry.example.com/charts/myapp:0.1.0
# Right: version as a flag
helm pull oci://registry.example.com/charts/myapp --version 0.1.0Authentication and authorization errors
A 401 Unauthorized means the registry did not accept your identity. A 403 Forbidden or denied message means it knows who you are but you lack permission on that path.
Work through these checks in order:
- Run
helm registry loginagain. Tokens expire, and a login from a different machine or shell does not carry over. - Confirm the host in
helm registry loginmatches the host in the reference exactly, including any port. - Check that the account has write permission for push and read permission for pull.
- In CI, confirm the job has write scope. On GitHub Actions this is
packages: writein thepermissionsblock.
helm registry login registry.example.com --username alice
helm push myapp-0.1.0.tgz oci://registry.example.com/chartsCredentials are stored in the same credential file that Docker uses, so a stale entry there can also cause a failure. Run helm registry logout registry.example.com, then log in again.
Not found errors
A 404 or not found on pull usually means one of three things.
- The tag does not exist. Chart versions become tags, so
--version 0.1.1needs a pushed chart whoseChart.yamlhasversion: 0.1.1. - The path or chart name is wrong. The chart name comes from the
namefield inChart.yaml, not from the.tgzfile name you happen to use. - The repository is private and your login does not cover it. Some registries return
404instead of403to hide that a private repository exists.
Case and tag character problems
Registry paths must be lowercase. A GitHub organization named My-Org must appear as my-org in oci://ghcr.io/my-org/charts. Uppercase letters in the path produce an invalid reference error.
Tags cannot contain +. Helm converts the + in a SemVer build suffix to _ when it makes the tag, so 1.0.0+build5 is stored as 1.0.0_build5. Pass the original 1.0.0+build5 to --version and Helm converts it again. Typing 1.0.0_build5 yourself can fail the version match.
TLS and connectivity errors
An error such as x509: certificate signed by unknown authority means Helm does not trust the registry certificate. Use --ca-file to supply your CA certificate. For a local test registry served over plain HTTP, add --plain-http to the command. Avoid --insecure-skip-tls-verify outside a throwaway test, because it removes protection against interception.
helm pull oci://registry.example.com/charts/myapp \
--version 0.1.0 \
--ca-file ./internal-ca.pemGetting more detail
Add --debug to any command to see the underlying registry response. Then compare what you typed against the registry's web interface to confirm the exact repository path and the list of tags.
Exercise
Exercise
You run helm push myapp-0.1.0.tgz oci://registry.example.com/charts/myapp and later helm pull oci://registry.example.com/charts/myapp --version 0.1.0 returns "not found". What went wrong, and how do you fix it?
Show answer
Helm appends the chart name on push, so the chart was stored at registry.example.com/charts/myapp/myapp:0.1.0. The pull looks in charts/myapp, where nothing exists. Push again to oci://registry.example.com/charts, which stores the chart at charts/myapp:0.1.0, and remove the misplaced copy if the registry allows it.