Skip to main content
New Participant
Sep 27, 2021 4:12 PM UTC
Question

GIT - error setting certificate verify locations

Hi Everyone, 
We are facing an issue with SSL certificate. I got cacert.pem downloaded from the curl site . I'm  getting the below error message  when I run the GIT clone command , 

fatal: unable to access 'https://github-xxx.xxx.xxx/': error setting certificate verify locations:    

  CAfile: /SYSTEM/tmp/rsusr/ported/etc/cacert.pem                                                                                  

  CApath: none                                                                                                                      


Has anyone faced this issue?.

    3 replies

    Sergey Rezepin
    Rocketeer
    Sep 28, 2021 7:18 AM UTC
    Hi Everyone, 
    We are facing an issue with SSL certificate. I got cacert.pem downloaded from the curl site . I'm  getting the below error message  when I run the GIT clone command , 

    fatal: unable to access 'https://github-xxx.xxx.xxx/': error setting certificate verify locations:    

      CAfile: /SYSTEM/tmp/rsusr/ported/etc/cacert.pem                                                                                  

      CApath: none                                                                                                                      


    Has anyone faced this issue?.

    Hi Grace!

    Could you say which version of git you are using and send the output of 'env | sort' command?
    git --version
    env | sort

    Thanks,
    Sergey

    New Participant
    Sep 29, 2021 1:48 PM UTC
    Hi Everyone, 
    We are facing an issue with SSL certificate. I got cacert.pem downloaded from the curl site . I'm  getting the below error message  when I run the GIT clone command , 

    fatal: unable to access 'https://github-xxx.xxx.xxx/': error setting certificate verify locations:    

      CAfile: /SYSTEM/tmp/rsusr/ported/etc/cacert.pem                                                                                  

      CApath: none                                                                                                                      


    Has anyone faced this issue?.
    The version of GIT is 2.26.2-78. I have attached the output of the environment variables.
    Sergey Rezepin
    Rocketeer
    Oct 5, 2021 7:54 AM UTC
    Hi Everyone, 
    We are facing an issue with SSL certificate. I got cacert.pem downloaded from the curl site . I'm  getting the below error message  when I run the GIT clone command , 

    fatal: unable to access 'https://github-xxx.xxx.xxx/': error setting certificate verify locations:    

      CAfile: /SYSTEM/tmp/rsusr/ported/etc/cacert.pem                                                                                  

      CApath: none                                                                                                                      


    Has anyone faced this issue?.

    Hi Grace,

    Thank you for the information.


    1) Set up GIT_SSL_CAINFO
    export GIT_SSL_CAINFO=/SYSTEM/tmp/rsusr/ported/etc/cacert.pem

    2) Check that cacert.pem is readable
    cat /SYSTEM/tmp/rsusr/ported/etc/cacert.pem | head -n 5

    You can also -
    3) Check the certificate chain at your repository:
    openssl s_client -showcerts -connect github-url.xxx:443

    4) Try to add the certificates from OpenSSL s_client output to cacert.pem file.

    Thanks,
    Sergey