Skip to main content
Question

GIT - error setting certificate verify locations

  • September 27, 2021
  • 3 replies
  • 2 views

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
Forum|alt.badge.img+1
  • Rocketeer
  • 73 replies
  • September 28, 2021
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


  • Author
  • New Participant
  • 1 reply
  • September 29, 2021
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
Forum|alt.badge.img+1
  • Rocketeer
  • 73 replies
  • October 5, 2021
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