繁体   English   中英

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

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

在 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
  • 我尝试重新编译 git 以使用 openssl,但没有做任何事情。
  • 我尝试了 ssh 和 https。
  • 我试图修改 http 的 git 设置。
  • 我修改了各种git内存设置。
  • Stack Overflow 上目前没有针对此问题的正确方法。
  • 我完全重新安装了Windows。 不行,还是被坑了。

四天的威士忌探戈狐步舞……然后我找到了它。

最新的 Windows Hyper-V 存在与您的 wifi 驱动程序有关的问题。 您需要从https://downloadcenter.intel.com/download/28876/Windows-10-Wi-Fi-Drivers-for-Intel-Wireless-Adapters?v=t获取最新信息

一旦安装了新的驱动程序,您就会惊叹 wsl2 中的 git 如何完全完成它应该做的事情。 我永远不会回到我生命中的那 5 天。 我希望这会让你不会失去你的 5 天。

这是问题: https : //github.com/microsoft/WSL/issues/4253

2020 年 11 月更新:关于WSL2 4253的最新评论指出:

将 MTU 设置为 1350(与 VPN 接口相同):

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

检查您的 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

可能需要Windows 10 build 20231来确保问题 5821“WSL vEthernet 适配器显示为断开连接”得到修复。

暂无
暂无

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

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