guaiZhang
V2EX  ›  问与答

WSL2 里网速 Git 拉取代码特别特别慢大家有好的解决方式吗

  •  
  •   guaiZhang · Nov 30, 2022 · 3404 views
    This topic created in 1435 days ago, the information mentioned may be changed or developed.

    物理机git clone时跑满带宽,但是 WSL2 里只有 10-100kb 左右。尝试过代理仍然效果甚微。每次git clone或者push时都会卡顿很久会有反应。

    搜了一圈没有找到解决方法,来问问 V 友们

    # ~/.bashrc
    export windows_host=`cat /etc/resolv.conf|grep nameserver|awk '{print $2}'`
    export ALL_PROXY=socks5://$windows_host:7890
    export HTTP_PROXY=$ALL_PROXY
    export http_proxy=$ALL_PROXY
    export HTTPS_PROXY=$ALL_PROXY
    export https_proxy=$ALL_PROXY
    
    # ~/.gitconfig
    [proxy]
    	https = socks5://172.28.144.1:7890
        http =  http://172.28.144.1:7890
    
    12 replies  •  2022-12-01 08:22:41 +08:00
    wanjiawei0755
    wanjiawei0755
    Nov 30, 2022 via Android
    1
    直接上游代理,把梯子挂路由器上
    Knuth
    Knuth
    Dec 1, 2022 via iPhone
    2
    ssh 代理
    thedrwu
    thedrwu
    Dec 1, 2022 via Android
    3
    先排除 filesystem 的因素?
    SpecterShell
    SpecterShell
    Dec 1, 2022
    4
    gitconfig 写反了,是 http.proxy ,不是 proxy.http
    flyn
    flyn
    Dec 1, 2022❤️1
    6
    如果只是临时使用的话,HTTP 地址前面加 https://ghproxy.com/ 也 OK
    Xusually
    Xusually
    Dec 1, 2022
    7
    首先排除文件系统性能瓶颈,WSL2 的老问题
    flyn
    flyn
    Dec 1, 2022
    8
    不好意思没看清楚 我还以为从 Github 上拉呢
    dcsuibian
    dcsuibian
    Dec 1, 2022
    9
    ssh 协议还是 http 协议?
    guaiZhang
    guaiZhang
    OP
    Dec 1, 2022 via Android
    11
    @dcsuibian http 勉强几十 kb 的速度,ssh 直接挂死。
    guaiZhang
    guaiZhang
    OP
    Dec 1, 2022 via Android
    12
    @wanjiawei0755 glados 路由器代理要升级账户。😣但是我总觉得是 wsl2 什么地方需要配置,物理机不加代理都能跑满带宽。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1431 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 18:47 · PVG 02:47 · LAX 10:47 · JFK 13:47
    ♥ Do have faith in what you're doing.