GIT HTTPS Access Problem

Recently i was working on some OSGI sample and was trying to download code from GIT hub. Here is the problem i face in downloading code

git error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https:…………………………….

I work on windows system and i have cygwin installed on my system.

Here is how i fixed it

The problem is that you do not have any of Certification Authority certificates installed on your system. And these certs cannot be installed with cygwin’s setup.exe.

There are two solutions: 1. Ignore ssl certificate verification:

$ env GIT_SSL_NO_VERIFY=true git clone https://github... (This dosen't work in all systems)

2. Actually install root certificates. Curl guys extracted for you certificates from mozilla: (This works in most of the system)

cacert.pem file is what you are looking for. This file contains > 250 CA certs (Lots of people you are going to trust with this command) . You need to download this file, split it to individual certificates put them to /usr/ssl/certs (your CApath) and index them.

Here is how to do it: With cygwin setup.exe install curl and openssl packages Execute  (AWK program us used to automate the steps)

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

You can get more options in

Njoy migrating to GITHub

One thought on “GIT HTTPS Access Problem

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s