git gnutls_handshake() failed: Error in the push function

Bug #1691462 reported by Peter Parzer
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
git (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When using git with https:// behind a corporate proxy it fails often with the error message:

gnutls_handshake() failed: Error in the push function.

For example:

git clone -q --mirror https://github.com/JuliaDiff/DualNumbers.jl.git /home/user/.julia/v0.4/.cache/DualNumbers
fatal: unable to access 'https://github.com/JuliaDiff/DualNumbers.jl.git/': gnutls_handshake() failed: Error in the push function.

After repeating the same command several times it finally works. Sometimes git work even the first time, but this is seldom. Usually it works when I repeat the command 2 or three times.

System: Ubuntu 16.04.2 LTS amd64, kernel 4.4.0-78-generic
git: 1:2.7.4-0ubuntu1.1
curl: 7.47.0-1ubuntu2.2
libcurl3-gnutls: 7.47.0-1ubuntu2.2

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in git (Ubuntu):
status: New → Confirmed
Revision history for this message
flp (hellbg) wrote :

Using git is already the newest version (1:2.7.4-0ubuntu1.3) on arm64, git worked on the 3rd attempt, with 1st and 2nd giving the 'push' error.

Revision history for this message
Clemens Utschig-Utschig (clemensutschig) wrote :

we are affected as well.

FROM ubuntu:16.04

apt-get update && apt-get -y install build-essential git libcurl4-openssl-dev libgnutls-openssl27 && dpkg -l | grep libgnutls && cd ${BUILD_DIR} && apt-get source nginx && apt-get build-dep -y nginx && cd ${BUILD_DIR}/nginx-1.10.3/debian/modules/ && git config --global http.sslVerify false && git clone https://github.com/kare/ngx_http_auth_crowd_module

ii libgnutls-openssl27:amd64 3.4.10-4ubuntu1.4 amd64 GNU TLS library - OpenSSL wrapper
ii libgnutls30:amd64 3.4.10-4ubuntu1.4 amd64 GNU TLS library - main runtime library

Cloning into 'ngx_http_auth_crowd_module'...
fatal: unable to access 'https://github.com/kare/ngx_http_auth_crowd_module/': gnutls_handshake() failed: Error in the push function.

this is behind a perfectly fine working corporate proxy (and yes in the env http_proxy / https_proxy also uppercase are set)

Revision history for this message
Clemens Utschig-Utschig (clemensutschig) wrote :

is there any way to get this solved .. this is (as we sit on docker and build the images automatically a big bummer for us)

Revision history for this message
Kenyon Ralph (kralph) wrote :

What fixed it for me was explicitly setting git's http.proxyAuthMethod to basic: git config --global http.proxyAuthMethod basic

If you run your git commands with environment variable GIT_CURL_VERBOSE=1, you might see that the proxy authentication is failing.

Revision history for this message
Daniel Murray (d-daniel-t) wrote :

This happened for me when I had https_proxy etc set with a https protocol (e.g. set to https://localhost:3128) instead of just http.

Revision history for this message
Murugesh (murugesh-g-4) wrote :

Facing same issue after following above comments solution:

unable to access 'https://bitbucket.org/xyz_orgname/productlfs.git/': gnutls_handshake() failed: Error in the push function.

Any other solution exists? Thanks in advance.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.