简体   繁体   English

Ubuntu wsl2 git 在大型存储库上收到“远程端意外挂断”

[英]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.在 Windows 上的 wsl2 中的 Ubuntu 19.04 中执行此操作数天。

$ 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.我尝试重新编译 git 以使用 openssl,但没有做任何事情。
  • I tried both ssh and https.我尝试了 ssh 和 https。
  • I tried to modify git settings for http.我试图修改 http 的 git 设置。
  • I modified all kinds of git memory settings.我修改了各种git内存设置。
  • Nothing currently on Stack Overflow is correct for this issue. Stack Overflow 上目前没有针对此问题的正确方法。
  • I completely reinstalled Windows.我完全重新安装了Windows。 Nope, still hosed.不行,还是被坑了。

Four days of Whiskey Tango Foxtrot... then I found it.四天的威士忌探戈狐步舞……然后我找到了它。

The latest Windows Hyper-V has issues with your wifi driver.最新的 Windows Hyper-V 存在与您的 wifi 驱动程序有关的问题。 You need to get the latest from https://downloadcenter.intel.com/download/28876/Windows-10-Wi-Fi-Drivers-for-Intel-Wireless-Adapters?v=t您需要从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.一旦安装了新的驱动程序,您就会惊叹 wsl2 中的 git 如何完全完成它应该做的事情。 I will never get those 5 days of my life back.我永远不会回到我生命中的那 5 天。 I hope this will keep you from losing 5 days of yours.我希望这会让你不会失去你的 5 天。

Here is the issue: https://github.com/microsoft/WSL/issues/4253这是问题: https : //github.com/microsoft/WSL/issues/4253

Update Nov. 2020: the latest comments on WSL2 4253 point out to: 2020 年 11 月更新:关于WSL2 4253的最新评论指出:

set MTU to 1350 (same as VPN interface):将 MTU 设置为 1350(与 VPN 接口相同):

 sudo ifconfig eth0 mtu 1350 # or ip link set dev eth0 mtu 1350

Check your MTU:检查您的 MTU:

PS C:\> netsh interface ipv4 show subinterface

   MTU  MediaSenseState   Bytes In  Bytes Out  Interface
------  ---------------  ---------  ---------  -------------
4294967295                1          0     117945  Loopback Pseudo-Interface 1
  1500                1  879583365  308029141  Wi-Fi
...
  1500                1    3616963    2778319  vEthernet (WSL)

vs.

➜ ip addr | grep mtu
5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000

A Windows 10 build 20231 might be needed to ensure issue 5821 "WSL vEthernet adapter shows up as disconnected" is fixed.可能需要Windows 10 build 20231来确保问题 5821“WSL vEthernet 适配器显示为断开连接”得到修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM