Podman cannot push to a private registry because the certificate is not trusted
Fix it fast
Most common cause, 1 of 4The registry's CA is not installed for Podman at all
Create a directory named after the registry host and port, and copy the CA certificate into it as ca.crt.
sudo mkdir -p /etc/containers/certs.d/registry.example.com:5000
sudo cp internal-ca.pem /etc/containers/certs.d/registry.example.com:5000/ca.crt
podman push registry.example.com:5000/team/app:1.0Short answer
x509: certificate signed by unknown authority on podman push means Podman found no trusted CA for the registry's certificate. Save the CA as ca.crt in /etc/containers/certs.d/<host>:<port>/, named exactly as in the image reference. On macOS and Windows the file must live inside the Podman machine VM, or use podman machine init --import-native-ca. Applies to Podman 6.x.
Which cause do you have?
Find out where Podman's engine runs and whether it is rootless. A remote service means a Podman machine VM (cause 3); a local engine means the certificate files on this host decide it (causes 1 and 2).
podman info --format json | grep -E '"serviceIsRemote"|"rootless"'Then find the line you see in this list and open its fix:
- 1The registry's CA is not installed for Podman at all
serviceIsRemote is false and no directory for the registry exists under /etc/containers/certs.d or ~/.config/containers/certs.d - 2The CA is there, but under a name Podman never looks up
A certs.d folder exists, yet it is called registry.example.com:443 while the image is tagged registry.example.com/..., or the CA file ends in .pem - 3Podman runs in a machine VM that does not have the CA
serviceIsRemote is true because podman on macOS or Windows talks to a Podman machine, and the CA is trusted only on the host, for example in the macOS keychain - 4A lab registry serves plain HTTP or has no certificate you can trust
The error changes to http: server gave HTTP response to HTTPS client, or nobody can hand you the CA
What does the error look like?
x509: certificate signed by unknown authorityhttp: server gave HTTP response to HTTPS client
Cause 1 of 4
The registry's CA is not installed for Podman at all
You seeserviceIsRemote is false and no directory for the registry exists under /etc/containers/certs.d or ~/.config/containers/certs.d
Check
Pushing to a registry whose certificate comes from an internal or self-signed CA fails with x509: certificate signed by unknown authority until Podman is given that CA. Podman reads per-registry TLS settings from certs.d directories, and any file ending in .crt there is treated as a CA certificate.
ls /etc/containers/certs.d/ ~/.config/containers/certs.d/ 2>/dev/nullFix
Create a directory named after the registry host and port, and copy the CA certificate into it as ca.crt. The /etc path serves both rootful and rootless runs; the ~/.config path affects only your user.
sudo mkdir -p /etc/containers/certs.d/registry.example.com:5000
sudo cp internal-ca.pem /etc/containers/certs.d/registry.example.com:5000/ca.crt
podman push registry.example.com:5000/team/app:1.0Verify
The push copies its blobs and ends with Writing manifest to image destination, with no x509 line.
podman push registry.example.com:5000/team/app:1.0Confirmed by raw.githubusercontent.com
Cause 2 of 4
The CA is there, but under a name Podman never looks up
You seeA certs.d folder exists, yet it is called registry.example.com:443 while the image is tagged registry.example.com/..., or the CA file ends in .pem
Check
The directory name has to match the host and port as written in the image reference. registry.example.com:443 only applies to images tagged with :443, and a reference without a port needs a folder without one. Files without the .crt extension are not read as CAs.
ls -R /etc/containers/certs.d/ ~/.config/containers/certs.d/ 2>/dev/nullFix
Rename the folder so it equals the host[:port] part of the tag, and give the CA file a .crt extension.
sudo mv /etc/containers/certs.d/registry.example.com:443 /etc/containers/certs.d/registry.example.com
sudo mv /etc/containers/certs.d/registry.example.com/ca.pem /etc/containers/certs.d/registry.example.com/ca.crtVerify
ls shows a folder whose name matches the image tag, holding ca.crt, and the push succeeds.
ls /etc/containers/certs.d/registry.example.com/Confirmed by raw.githubusercontent.com
Cause 3 of 4
Podman runs in a machine VM that does not have the CA
You seeserviceIsRemote is true because podman on macOS or Windows talks to a Podman machine, and the CA is trusted only on the host, for example in the macOS keychain
Check
With a Podman machine, the podman command you type is a remote client, and the engine that contacts the registry runs inside the VM. Certificates trusted by the host system are not imported unless you ask for it, and the remote client does not offer --cert-dir.
podman info --format json | grep '"serviceIsRemote"'Fix
For a new machine, create it with --import-native-ca so the host's trusted CAs are imported when it starts. For an existing machine, open a shell in the VM and put the CA into certs.d there. The macOS home folder is mounted into the VM under the same path by default.
# new machine
podman machine init --import-native-ca --now
# existing machine
podman machine ssh
sudo mkdir -p /etc/containers/certs.d/registry.example.com:5000
sudo cp /Users/<you>/internal-ca.crt /etc/containers/certs.d/registry.example.com:5000/ca.crt
exitVerify
Running the push again from the host terminal now completes.
podman push registry.example.com:5000/team/app:1.0Confirmed by docs.podman.io
Cause 4 of 4
A lab registry serves plain HTTP or has no certificate you can trust
You seeThe error changes to http: server gave HTTP response to HTTPS client, or nobody can hand you the CA
Check
TLS verification is on by default for push, pull and build. A registry without encryption therefore fails before any certificate is checked.
podman push --tls-verify=false registry.example.com:5000/team/app:1.0Fix
Prefer real TLS on the registry. For a test box only, turn verification off for one command, or mark that one registry insecure in a drop-in file. On a Podman machine, create the file inside the VM.
# /etc/containers/registries.conf.d/registry-lab.conf
[[registry]]
location = "registry.example.com:5000"
insecure = trueVerify
podman push works without --tls-verify=false, which confirms the drop-in file is read.
podman push registry.example.com:5000/team/app:1.0Confirmed by raw.githubusercontent.com
How do I stop it coming back?
- Ship the internal CA to every build host and Podman machine with the same provisioning script, under /etc/containers/certs.d/<host>:<port>/ca.crt.
- Tag images with one fixed form of the registry name (with or without the port) and name the certs.d folder to match it.
- Create new Podman machines with --import-native-ca when your company CA is already trusted on the laptop.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.