Search code examples
windowsgitsslwindows-subsystem-for-linuxgnutls

Ubuntu wsl2 git getting "The remote end hung up unexpectedly" on large repos


Getting this action for days in Ubuntu 19.04 in wsl2 on Windows.

$ git clone https://github.com/gohugoio/hugo.git
Cloning into 'hugo'...
error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received.
fatal: The remote end hung up unexpectedly
  • I tried recompiling git to use openssl, didn't do anything.
  • I tried both ssh and https.
  • I tried to modify git settings for http.
  • I modified all kinds of git memory settings.
  • Nothing currently on Stack Overflow is correct for this issue.
  • I completely reinstalled Windows. Nope, still hosed.

Four days of Whiskey Tango Foxtrot... then I found it.


Solution

  • The latest Windows Hyper-V has issues with your wifi driver. You need to get the latest from https://downloadcenter.intel.com/download/28876/Windows-10-Wi-Fi-Drivers-for-Intel-Wireless-Adapters?v=t

    Once the new drivers are installed, you can marvel at how git in wsl2 totally does what it is supposed to. I will never get those 5 days of my life back. I hope this will keep you from losing 5 days of yours.

    Here is the issue: https://github.com/microsoft/WSL/issues/4253