2

OS: Windows 10 Pro VM: Ubuntu 18.04 LTS

I am trying to clone a repo I forked (freeCodeCamp - if it matters), on my WSL, but it keeps failing with this error:

error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received. fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed

  • I have tried increasing the buffer size through Git.
  • I have tried changing to WSL 1 (2 is currently my default).
  • I have tried increasing my packet size through Git.
  • I have tried cloning through SSH (this is not working due to my poor attempts to set up the handshake)
  • I have managed to clone a much smaller repo.

Does anyone have more ideas?

Sky020
  • 45
  • 7
  • If the URL is correct (that is, you're using an HTTPS URL and not an HTTP one), then this is a network problem. Are you using a firewall or antivirus other than the one built into Windows? Are you using a SSL or MITM proxy? If so, does uninstalling all of that and restarting fix it? – bk2204 May 11 '20 at 19:48
  • Only firewall and antivirus is the built-in one. After disabling it, same error occurred. No proxies. I heard some people had success with running `git clone` over ethernet connection, but that made no difference for me. I frequently run git commands to do with this repo on this laptop. It is just an issue when trying through the Ubuntu terminal. – Sky020 May 11 '20 at 21:40

2 Answers2

1

After following most of this post: https://devopscube.com/gnutls-handshake-failed-aws-codecommit/

I was able to resolve the problem. The only differences were the versions used, and I did not complete the final step. Hope this helps someone else.

Sky020
  • 45
  • 7
0

First, make sure you are using the latest 2.26.2 Git version available (even in Ubuntu 18.04 VM, upgrading Git through ppa)

Second, if the issue persists, check if one of the settings of this question helps.
Doing a shallow clone, to reduce the history, might help if the freeCodeCamps repo is a giant one.

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283