🌐Network Problems
How to clone a github repository
🇨🇳Similar to the network problems when visit websites like Google in VM, Chinese user couldn't successfully connect with Github so as to clone a repository. Here are some solutions:
through a proxy server
(Highly recommended this for everyone!) For others, refer to this: How to use proxy in WSL? · issue #2122 · microsoft/WSL github.com
(❤️🩹this doesn't work for me) For Chinese, refer to this: 拉取github项目的时候,git clone https 失败,需要设置 wsl2 使用 windows 上的代理
NOTE: If this solution doesn't work, maybe this will help you: WSL cannot use proxy with networkingMode=mirrored · issue #10794 · microsoft/WSL github.com
through a mirror website
use
git clone https://mirror.ghproxy.com/<your target repository https url>
For ways of cloning a private repo or use wget & curl to download file, please refer to the reference: github proxy 代理加速 (I promise it's quite esay)
Last updated