Skip to content

Trust Self-signed certificate in sles15

Problems

When connecting a repository with self-signed certificate in Sles15, the curl will complain it can't verify the repository host with certificate error.

Solution

It's required to add the repository self-signed certificate chain to the system, after that the action can succeed.

Here are the steps:

  1. go to /etc/pki/trust/anchors/
  2. create a pem file contains the certificate chain
  3. Run c_rehash to create symbolic links
  4. Run sudo update-ca-certificates to update the certificate

Then, the issue would be resolved.