Podman push image fails with tls certification verification error

466 views Asked by At

I can login to the registry using a selfSignedCert from my Mac(Apple M1 Max). The certificate is saved in /etc/containers/certs.d as suggested by this doc. But when it comes to image push podman push ${IMAGE_PUSH_URL}, I get the following error:

pinging container registry <registry hostname>: Get "<registry url>": tls: failed to verify certificate: x509: certificate signed by unknown authority

So I added --tls-verify=false to make it work.

Just wondering if the login not using tls cert verification? I am reluctant to set tls verification to false since I might need to use some external registry to push the images. How can i make sure tls verification is performed while pushing the images?

1

There are 1 answers

2
tjarbo On

As you are using Podman Desktop, podman is running its containers inside a Fedora VM under the hood. To ensure that TLS connections are established correctly, please add your certificate to the VMs trusted certificates store. Follow the steps as described in the official documentation:

https://github.com/containers/podman/blob/main/docs/tutorials/podman-install-certificate-authority.md