Home > General > “error: gnutls_handshake() failed” when connecting to https servers

“error: gnutls_handshake() failed” when connecting to https servers


http://askubuntu.com/questions/186847/error-gnutls-handshake-failed-when-connecting-to-https-servers/187199#187199

This problem occurred to me especially behind corporate firewall on ubuntu 14.04. I tried all possible approaches before coming across solution to compile GIT with openssl rather than gnutls. Copy+Pasting below that resolved the problem…

To do this, run the following commands:

sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
sudo apt-get build-dep git
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
dpkg-source -x git_1.9.1-1.dsc
cd git-1.7.9.5

(Remember to replace 1.9.1 with the actual version of git in your system.)

Then, edit debian/control file (run the command: gksu gedit debian/control) and replace all instances of libcurl4-gnutls-dev with libcurl4-openssl-dev.

Then build the package (if it’s failing on test, you can remove the line TEST=test from the file debian/rules):

I suggest remove TEST=test from debian/rules as it takes a lot of time to build the package.

sudo dpkg-buildpackage -rfakeroot -b

Install new package:

i386: sudo dpkg -i ../git_1.7.9.5-1_i386.deb

x86_64: sudo dpkg -i ../git_1.7.9.5-1_amd64.deb

Inspired from here: https://github.com/xmendez/wfuzz/wiki/PyCurlSSLBug

 

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: