Search code examples
githttpsopensuse

Cannot use SSL certificate when using Git on openSUSE


I'm using Git on openSUSE and receive the following error when trying to clone a Git repository via HTTPS.

$ git clone https://example.com/foo.git
Cloning into 'foo'...
fatal: unable to access 'https://example.com/foo.git/': SSL certificate problem: unable to get local issuer certificate

How do I fix this? I'm an openSUSE novice but am knowledgeable of other Linux distros.


Solution

  • The Root CA certificates are likely not installed on the system.

    Install the certificates from the command line:

    $ zypper install ca-certificates{,-cacert,-mozilla}