'Git: gnutls_handshake() failed: Error in the pull function
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.
Solution 1:[1]
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
Solution 2:[2]
I resolved this problem by-
apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev
Solution 3:[3]
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!
Solution 4:[4]
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
Solution 5:[5]
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
Solution 6:[6]
[**I had a problem like yours, and I gave an alternative to solve it, the steps are:
- make sure to log in as super admin in UBUNTU terminal
- try to repeat the push/pull command in your GIT
- You will be asked to provide your github email and password (starting August 13, 2021 you will have to change the password with a token)
- create a personal token in your GIT, you can see the doc at https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ **]screenshot my problem
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Cristian Sepulveda |
| Solution 2 | hardik chugh |
| Solution 3 | Isaac |
| Solution 4 | isunjn |
| Solution 5 | Kaumadie Kariyawasam |
| Solution 6 | Yoga Pratama |
