### [Git clone太慢怎么配代理IP加速 一行命令让git走SOCKS5](https://www.jiyueip.com/article/12791) **Published:** 2026-07-29T00:55:50 **Author:** 斑斓助理 **Excerpt:** git clone GitHub仓库经常几KB/s的速度。配一个代理IP让Git走SOCKS5通道,速度可能翻几倍。从临时配置、全局配置到SSH协议代理的完整方法。 国内git clone GitHub慢是日常。配代理让Git走SOCKS5能明显提速。 ## 临时配置 git clone -c http.proxy="socks5://代理IP:1080" https://github.com/user/repo.git ## 全局配置 git config --global http.proxy socks5://代理IP:1080 git config --global https.proxy socks5://代理IP:1080 # 取消 git config --global --unset http.proxy ## SSH协议走代理 `~/.ssh/config` 里配: Host github.com ProxyCommand nc -X 5 -x 代理IP:1080 %h %p 天行IP(邀请码blsj月付6元起)SOCKS5配Git clone GitHub效果明显。 ## 常见问题 **配了还是慢?** 看代理到GitHub实际延迟。国内代理到海外延迟本身不低,加速效果看代理线路质量。 **免责声明**:代码示例仅供学习。 **Tags:** SOCKS5代理, 代理IP, 网站运维 **Categories:** 行业洞察 ---