Sunday, November 6, 2011

Git SSL verification failed

I've found a problem with communication over https with GoogleCode. It supports only this way so you can't use GIT over SSH as like as GitHub.  I'm using git from Cygwin at Windows XP. Probably, using any other system or git provider (eg. msysgit) doesn't produce this error. If you use https connection, this message appears:

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 https://code.google.com/p/<project_name>/info/refs

fatal: HTTP request failed



So, I's loking for solution of this problem and found it on StackOverFlow. It's very simple. You have a few posibilities for solution. I've chosen first one - importing CA certs beacuse it's good for solving possible future problems (at GitHub using wget I must use http against to https too despite of this problem).

$ cd /usr/ssl/certs
$ curl http://curl.haxx.se/ca/cacert.pem | awk 'split_after==1{n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1} {print > "cert" n ".pem"}'
$ c_rehash



If you don't have curl, you can use Wget as well (wget -O -).
At linked page they suggest disable ssl verify by environment variable or by git config flag. I think described solution is the best of.

No comments:

Post a Comment