I've installed Ubuntu Server 18.04.2 on Hyper-V in Windows 10 Pro (Version 1809). And I setup the network using Default Switch. The git is the default one installed on the system with version 2.17.1

The system can access the internet, however, when I'm trying to clone a large-size git repository (For instance, git on github), I've received this error:

error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received.

fatal: The remote end hung up unexpectedly

Even when using ssh, the error still occurred:

Connection to github.com closed by remote host.

fatal: The remote end hung up unexpectedly

Then I tried to mirror the project on gitlab and then clone it, the error also occurred, which means that the problem isn't due to the remote side.

When I tried to clone it from WSL, there is no error.

However, when I'm trying to clone a small-size repository, there is no error.

Changing postBuffer doesn't help.

One possible solution is to use the External Switch (the error fixed), however, this make the network on both the host and the virtual machine really slow, so that's impossible to use that.

  • Using an external switch should not affect network performance. Make sure you've updated your drivers for your network card. If possible, use a wired NIC instead of a wireless. – essjae May 6 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.