0

I am running Ubuntu 12.04 and git 1.7.9.5.

A couple days ago, git was working fine. It would appear the installation or configuration of the passenger module for apache2 has modified some necessary package or altered a file used by one of them, and now any attempt to git clone I have tried results in:

error: gnutls_handshake() failed: A TLS packet with unexpected length was received. while accessing https://github.com/fnando/i18n-js.git/info/refs
fatal: HTTP request failed

All references I can find to this error when attempting a git clone are dated and appear to have to do with at one time, a bug in the default install of git. I have attempted the steps in https://bugs.launchpad.net/ubuntu/+source/pycurl/+bug/926548 but this is not working; the dpkg-source command fails because pycurl_7.19.0-ubuntu3.dsc does not exist.

I have tried removing and reinstalling a number of packages, including git, curl, libcurl3-gnutls, and libcurl4-openssl-dev with no change - git clone still fails with this same error.

At this point, I mostly care about restoring the use of git clone (and whatever other functions will ultimately fail because of the underlying issue).

kraxor
  • 5,627

1 Answers1

0

I had the same problem and had to recompile git against libcurl-openssl-v4 instead of gnutls. It might have something to do with the route to the git server and gnutls not liking something about it.

There's a PREVIOUS step by step solution on how to do just this posted on this site but I do have a couple of things I did differently and some issues I ran into.

Firstly I don't suggest using dpkg -i as the method to install the package, use gdebi from the gdebi-core package because it allows you to install a package and its dependencies.

Most importantly one thing that is not mentioned in that solution is that MULTIPLE *.deb packages will be produced, hence the reason to use gdebi-core.

Secondly and lastly make sure to install the git-man package first and THEN install the main package and its dependencies, for some reason the main package listed on that solution won't install with either dpkg or gdebi without installing the manual first.

eco
  • 171