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

2022 年 8 月 29 日
 Renco
6141 次点击
所在节点    程序员
39 条回复
wmrrr
2022 年 8 月 29 日
试试全局代理
conateri
2022 年 8 月 29 日
clash for windows 的 TUN Mode
herozzm
2022 年 8 月 29 日
host 修改大法?
AmoreLee
2022 年 8 月 29 日
clone 的链接有 https 和 ssh 的,可以都试试。有时其中一种可能会更快一些。

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

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

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

vim ~/.ssh/config
添加如下行:
#ssh proxy
ProxyCommand nc -v -x 127.0.0.1:7890 %h %p
sprite82
2022 年 8 月 29 日
@ysc3839 感谢,涨知识了
Renco
2022 年 8 月 29 日
git 代理配置也加了,可能是代理比较慢吧。换 ssh 会好一点点
cheng6563
2022 年 8 月 29 日
http 基本是废的,换 ssh 就好了
Kevinyy
2022 年 8 月 29 日
试试 这个命令:git clone --config http.proxy="http://127.0.0.1:7890" https://github.com/****/xxxx.;
licoycn
2022 年 8 月 29 日
nekolr
2022 年 8 月 29 日
Proletariused
2022 年 8 月 29 日
试试 [ghproxy]( https://ghproxy.com/)

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://study.congcong.us/t/876241

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX