• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Renco
V2EX  ›  程序员

github 相关的 push pull clone 都很慢,挂代理了 clone 也只有 100kb/s 的速度,有什么解决办法么

  •  
  •   Renco · Aug 29, 2022 · 7099 views
    This topic created in 1527 days ago, the information mentioned may be changed or developed.
    wmrrr
    wmrrr
    Aug 29, 2022
    1
    试试全局代理
    conateri
    conateri
    Aug 29, 2022
    2
    clash for windows 的 TUN Mode
    herozzm
    herozzm
    Aug 29, 2022
    3
    host 修改大法?
    AmoreLee
    AmoreLee
    Aug 29, 2022❤️1
    4
    clone 的链接有 https 和 ssh 的,可以都试试。有时其中一种可能会更快一些。

    另外 git 似乎不会走全局代理,需要 git config 配置一下,可以参考一下:

    https://c1rew.github.io/2019/05/19/git-clone-%e5%8a%a0%e9%80%9f/
    sprite82
    sprite82
    Aug 29, 2022
    5
    git config --global http.proxy socks5://127.0.0.1:7890
    placeholder
    placeholder
    Aug 29, 2022❤️1
    6
    得用 git 命令设置代理,光挂上代理是没用的

    记得设置代理的时候端口号要看代理软件设置的端口号是多少,要对应上才行
    cvbnt
    cvbnt
    Aug 29, 2022 via Android
    7
    cfw 的 tun 模式
    CrazyMonkeyV
    CrazyMonkeyV
    Aug 29, 2022
    9
    完整了写了 git clone 使用代理的流程,按照步骤来,不可能慢
    ysc3839
    ysc3839
    Aug 29, 2022❤️5
    10
    @sprite82 git 底层使用 libcurl 发送 http 请求,而 libcurl 的代理使用 socks5://时会在本地解析 DNS ,应该改成 socks5h://
    https://curl.se/libcurl/c/CURLOPT_PROXY.html
    hervey0424
    hervey0424
    Aug 29, 2022
    12
    再.gitconfig 中添加代理
    mazai
    mazai
    Aug 29, 2022❤️2
    13
    如果是用 ssh 的方式,可以使用挂个 ssh 代理

    vim ~/.ssh/config
    添加如下行:
    #ssh proxy
    ProxyCommand nc -v -x 127.0.0.1:7890 %h %p
    sprite82
    sprite82
    Aug 29, 2022
    14
    @ysc3839 感谢,涨知识了
    Renco
    Renco
    OP
    Aug 29, 2022
    15
    git 代理配置也加了,可能是代理比较慢吧。换 ssh 会好一点点
    cheng6563
    cheng6563
    Aug 29, 2022
    16
    http 基本是废的,换 ssh 就好了
    Kevinyy
    Kevinyy
    Aug 29, 2022
    17
    试试 这个命令:git clone --config http.proxy="http://127.0.0.1:7890" https://github.com/****/xxxx.;
    nekolr
    nekolr
    Aug 29, 2022
    19
    Proletariused
    Proletariused
    Aug 29, 2022❤️1
    20
    试试 [ghproxy]( https://ghproxy.com/)
    Vegetable
    Vegetable
    Aug 29, 2022
    22
    直接使用镜像加速呗 https://doc.fastgit.org/zh-cn/guide.html
    sunny1688
    sunny1688
    Aug 29, 2022
    23
    export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
    git push
    Kasumi20
    Kasumi20
    Aug 29, 2022
    24
    咱都是通过 nc 走 socks5 的
    Marionic0723
    Marionic0723
    Aug 29, 2022
    25
    Cloudflare WARP ,全局的,电信也能跑 200M
    cweijan
    cweijan
    Aug 29, 2022
    26
    改成 ssh clone, 速度比 http 快, 挂代理慢是你的代理问题..
    wu67
    wu67
    Aug 29, 2022
    27
    把 export ALL_PROXY=balabala 这个设置一个 alias 写到 shell 配置里面, 需要用这种收到网络干扰的命令行时临时运行一遍就行
    kkocdko
    kkocdko
    Aug 29, 2022
    28
    上透明代理。
    keenkiller
    keenkiller
    Aug 29, 2022 via Android
    29
    上 ghproxy
    retrace
    retrace
    Aug 29, 2022
    30
    换个好的代理
    20015jjw
    20015jjw
    Aug 29, 2022 via iPhone
    31
    有一说一
    clone 慢还行
    push 慢怎么感觉用途有点奇怪
    ByteCat
    ByteCat
    Aug 29, 2022
    32
    直接开 Clash TUN Mode ,最优雅的方式
    likayi
    likayi
    Aug 30, 2022 via Android
    33
    路由器➕全局代理就好了
    zhuweiyou
    zhuweiyou
    Aug 30, 2022
    34
    我一直是 13 楼方案
    kujio
    kujio
    Aug 30, 2022
    35
    git config --global https.proxy http://127.0.0.1:7890
    blening
    blening
    Aug 30, 2022
    36
    可以转到国内来。
    tpxcer
    tpxcer
    Aug 30, 2022
    38
    换个代理服务器
    aimerneigesoft
    aimerneigesoft
    Aug 30, 2022
    39
    万能软路由
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2349 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 92ms · UTC 15:48 · PVG 23:48 · LAX 07:48 · JFK 10:48
    ♥ Do have faith in what you're doing.