WSL下使用git克隆失败解决
- WSL默认nat模式,别动了
- 防火墙放行,见图1
- git导入[bash1],ip为你wsl上linxu通过ifconfig获取的本机ip,端口对好
- 某alcsh软件开启tun模式【经过测试,不开也行】
- 应该成了,如果不行,修改.wslconfig为下面这种[bash2] 【路径:C:\Users\你的用户名.wslconfig】
[bash1]
git config --global http.https://github.com.proxy http://172.24.19.109:7890
git config --global https.https://github.com.proxy http://172.24.19.109:7890
[bash2]
[wsl2]
nestedVirtualization=true
ipv6=true
[experimental]
autoMemoryReclaim=gradual # gradual | dropcache | disabled
dnsTunneling=true
firewall=true
autoProxy=true
图1
- 参考
https://blog.csdn.net/zengaliang/article/details/135661812
https://zhuanlan.zhihu.com/p/153124468
https://blog.csdn.net/2301_77554343/article/details/145757260
https://zhuanlan.zhihu.com/p/15762609815
https://blog.csdn.net/weixin_57253447/article/details/145724156
https://zhuanlan.zhihu.com/p/15762609815
https://blog.csdn.net/Desecrater/article/details/133581868