Git: gnutls_handshake() failed: Error in the pull function

Viewed 59069

I got the error when using git pull command

fatal: unable to access 'https://github.com/path/to/repo.git/': gnutls_handshake() failed: Error in the pull function.

I try many methods from Internet but they're unuseful. Also, tried to deal with proxy in my network.

My PC: Ubuntu 16.04 LTS x86_64

Does it have any effective ways to resolve the problem ?

Note: There're some solutions https://devopscube.com/gnutls-handshake-failed-aws-codecommit/ or https://askubuntu.com/questions/186847/error-gnutls-handshake-failed-when-connecting-to-https-servers but it didn't work in my case.

6 Answers

I resolved this problem by-

 apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev

My server is behind a proxy and I got the same error, I solved this modifying ~/.gitconfig adding the proxy conf:

[http]
    proxy = http://xxx.xxx.xxx.xxx:pppp

I received the same error verbatim using git in Windows-WSL2/Ubuntu

In my case it was resolved when I dropped my corporate VPN connection and resumed using git successfully and immediately.

To verify that as causation rather than correlation, I reconnected to the VPN and tried again and it broke again; then dropped VPN the second time - lo and behold it worked

Hope that helps someone out there!

I resolved this by updating git to the lasted version:

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

I got this error when i'm cloning the git project. cloning url port & browser displayed url port in the project are shows different url ports. hence i used browser displayed url port to cloning the project & i could clone the project successfully

Related