desktop: 'SSL certificate problem: unable to get local issuer certificate' when trying to clone repos

Description

[Cannot clone repositories]

Version

GitHub Desktop version: [1.0.11]

OS version: [Microsoft Windows [Version 10.0.17063.1000]]

Steps to Reproduce

  1. [Clone a Repository]
  2. [Choose a repository]
  3. [and so on]

Expected behavior: [Repository cloned]

Actual behavior: [Cloning into ‘path’… fatal: unable to access ‘url’: SSL certificate problem: unable to get local issuer certificate]

Reproduces how often: [100%]

Logs

2017-12-26.desktop.production.log

Additional Information

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (5 by maintainers)

Most upvoted comments

I go this error in VS2017 and solved it by opening Git bash and then $ git config --global http.sslBackend schannel. Thanks to https://stackoverflow.com/questions/16668508/how-do-i-configure-git-to-trust-certificates-from-the-windows-certificate-store

I solved it on windows 10 by enabling “Use the native Windows Secure Channel library” when (re-)installing git instead of “Use the OpenSSL library”

screenshot

@azumukupoe could you share your Git configuration value by opening a command line and running this command?

$ git config -l --show-origin

Thanks for offer. I don’t have anymore time for this. I just reverted to what I did once a few years which is the standard workaround: sslVerify=false.

I think I know what’s going on, but I haven’t had a chance to test this out.

Your Git for Windows has a system Git configuration with these values:

[http]
    sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
    sslbackend=schannel

GitHub Desktop won’t see these values, as it has it’s own system configuration file with http.sslbackend=schannel set. This means it’ll use the Windows Certificate Store to validate server certificates.

In your global ~/.gitconfig you’ve set http.sslbackend back to the classic openssl. GitHub Desktop will use these values, but without also setting http.sslcainfo it’s going to fail on all clones - because no backing store is found for Desktop.

So you have two options:

  • if you don’t need to set http.sslbackend=openssl globally, removing that value should make Desktop work
  • if you need http.sslbackend=openssl set globally, you should also set http.sslcainfo so that GitHub Desktop has a backing store of certificates to validate

Let me know if you have any other questions!

Please don’t disable SSL unless you know what you are doing. In my case, updating Git for Windows fixed the issue because my certificates were out of date.

Dankeschön von euer helfen herzlichen Glückwunsch wünsche alles

‏‫من الـ iPhone الخاص بي‬

‫في 16‏/02‏/2019 الساعة 11:47 ص، كتب/كتبت ‏Vasudhatapriya ‏<notifications@github.commailto:notifications@github.com>:‬

SSL certificate problem: certificate has expired.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/desktop/desktop/issues/3684#issuecomment-464335577, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AsxK35L_kfQK06RuRcmfEpDczxd8Cq_Eks5vN-GvgaJpZM4RMofc.

installed the latest version git and it worked

Closing this out as resolved. @azumukupoe let me know if you’re still encountering issues.