3

When attempting to git clone any repository I get this error

fatal: unable to access <repo url>: gnutls_handshake() failed: Close notify

Just incase it helps I am on a Raspberry Pi Zero.

Git version: 2.1.4

libgnutls-deb0 version 3.3.8-6+deb9 architecture armhf

libgnutls-open version 3.3.8-6+deb9 architecture armhf

J03L
  • 314
  • 3
  • 17
  • And yes I do have good connection – J03L Jun 15 '19 at 20:14
  • 1
    What version of Git and what version of GnuTLS are you using? – bk2204 Jun 15 '19 at 20:55
  • 'git version' reports 'git version 2.1.4' and attempting to update with 'sudo apt-get update git' says it is the latest version already. – J03L Jun 16 '19 at 11:40
  • Not sure how to check gnutls version. – J03L Jun 16 '19 at 11:46
  • EDIT: On my second comment, I meant 'sudo apt-get install git' – J03L Jun 16 '19 at 11:54
  • 1
    You can find the version of GnuTLS by doing `dpkg -l libgnutls*`. – bk2204 Jun 16 '19 at 12:06
  • libgnutls-deb0 and libgnutls-open both report '3.3.8-6+deb8' with the 'armhf; architecture – J03L Jun 16 '19 at 12:30
  • hm, might put a bounty on this. – J03L Jun 17 '19 at 15:07
  • 1
    You haven't said, but I assume from the tags you're attempting to connect to GitHub. Are you on a public Wi-Fi network on in a situation with a proxy, like a corporate environment? This message means the server said it didn't want to complete the encrypted connection, so either GitHub hung up (usually because the protocol is too old, which is not the case here) or someone in the middle did. – bk2204 Jun 18 '19 at 00:01
  • No, i am at home. No proxies or anything like that, just a normal router. I can download github repos from the actual website itself, but thats not an option if trying to install something from a script that automatically tries to clone github repos (a lot of them too in this case.) – J03L Jun 18 '19 at 16:42
  • Related issue: https://stackoverflow.com/questions/6289948/received-close-notify-during-handshake – Julian Jun 21 '19 at 15:28
  • Problem is, everyone else seems to be able to connect. Also I get this consistently. At least its not completely unheard of though. – J03L Jun 22 '19 at 12:34
  • Did you changed anything in SSL Certificate? – Akash Jun 25 '19 at 12:18
  • https://askubuntu.com/questions/186847/error-gnutls-handshake-failed-when-connecting-to-https-servers Use above link see the error details and step to solve – Akash Jun 25 '19 at 12:23
  • Different issue and wont work anyway – J03L Jun 26 '19 at 15:24

1 Answers1

0

Try:

git config --global http.sslVerify false

to disable verification it lets you clone but it's not the best solution you should check server configuration.

Hope it helps

seddikomar
  • 767
  • 6
  • 15
  • That isn't going to work in this case, because it's the server notifying the client that it's closing the connection, not the client refusing to continue the negotiation because the certificate is invalid. – bk2204 Jun 22 '19 at 16:45