I'm a programmer specialising in performant and scalable systems using PHP and Ruby and cooking


Published:

Smart HTTP, Git CLI and self signed certificates

So you've setup your shiny new git server and you're serving your repositories over Smart HTTP. In an effort to keep this a little secure you have decided to use SSL encryption on your requests, so:

$ git clone user@mygitserver/git/project.git

You would expect to be prompted for your password, however:

Cloning into 'project'...  
error: SSL certificate problem, verify that the CA cert is OK. Details:  
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing user@mygitserver/git/project.git/info/refs  
fatal: HTTP request failed  

You need to disable SSL certificate verification in order to get past this boundry:

export GIT_SSL_NO_VERIFY=true  

Simply add this to your ~/.bash_profile to enable this for future use and run the following to update your current session:

$ . ~/.bash_profile