git error message -> gnutls_handshake() failed: A TLS packet with unexpected length was received

Asked by Dorothee Hueser on 2014-10-17

How can I solve the problem with gnu TLS using git via https:
git push origin master
fatal: unable to access 'https://gitlab.xxxx/': gnutls_handshake() failed: A TLS packet with unexpected length was received.

Question information

English Edit question
Ubuntu git Edit question
No assignee Edit question
Solved by:
Mark Rijckenberg
Last query:
Last reply:

thousand thanx to Mark, your advise to manimpulate the .deb package
the decisive matter is to replace libcurl4-gnutls-dev by libcurl4-openssl-dev!!!!
For this a new compilation of git is necessary:

I did not follow the way of the posting of 2013 and 2013, however,
I now took the current git source from


before that I followed the instruction of the page I got that link from
sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential
but NOW following the advise of Mark's link avoiding to use the buggy gnutls I
removed libcurl4-gnutls-dev and installed libcurl4-openssl-dev:

sudo apt-get install libcurl4-openssl-dev

there after I did the make stuff, for my ubuntu 14.04 LTS git settings it is expected to be in /usr/bin not in /usr/local/bin
such that
make prefix=/usr all
sudo make prefix=/usr install