mac 下如何拯救龟速 github 克隆

2020 年 11 月 28 日
 tlerbao

机场有两个,目前 mac 下用的是 ClashX 但是还是没有办法拯救终端下 github 克隆超慢的问题 只有几 KB 每秒,请问各位大神怎么办

15695 次点击
所在节点    git
77 条回复
z7356995
2020 年 11 月 28 日
我是在路由器上翻的
nomedia
2020 年 11 月 28 日
proxy
z7356995
2020 年 11 月 28 日
第二种文法 export http
raychar
2020 年 11 月 28 日
https_proxy
HTNecro
2020 年 11 月 28 日
终端设置代理试试,设置到 clashX 开放的端口
export ALL_PROXY=http://127.0.0.1:{port}
WillBC
2020 年 11 月 28 日
export http_proxy 这种关键词你搜一下就有了
yukiww233
2020 年 11 月 28 日
clashx 自带复制终端代理...
MrCurly
2020 年 11 月 28 日
clashx 可以导出终端代理链接
tlerbao
2020 年 11 月 28 日
@yukiww233 @MrCurly @WillBC @HTNecro @z7356995

果然 ClashX 可以直接复制代理命令,我试了一下,好像 mac 自带终端加速了,但是 iTerm2 好像还是不行呢?我姿势还是不对?
imdong
2020 年 11 月 28 日
vim ~/.ssh/config
```
Host proxy-ssh
Hostname server_ip
User root

Host github.com
ProxyJump proxy-ssh
```
git clone git@github.com:user/name.git
yingqi7
2020 年 11 月 28 日
https_proxy
greatbody
2020 年 11 月 28 日
软路由透明那啥更香。
imdong
2020 年 11 月 28 日
export HTTPS_PROXY=http://127.0.0.1:1080

git clone https://github.com/user/name.git


很多人设置了 https 代码却使用 git clone git@github.com 导致没用。

因为 ssh 不走 https 。
ConnersHua
2020 年 11 月 28 日
ClashX 「菜单」的「复制终端代理命令」或者使用 ClashX Pro 的「增强模式」
kosgug
2020 年 11 月 28 日
## ssh github 加速
```
vi ~/.ssh/config
```
```
Host github.com
HostName github.com
User git
ProxyCommand nc -v -x 127.0.0.1:1081 %h %p
```
95276
2020 年 11 月 28 日
如果你想加速 git@github.com 可以用这个 https://www.dazhuanlan.com/2019/08/16/5d560adf8394b/
dixin
2020 年 11 月 28 日
dixin
2020 年 11 月 28 日
lostberryzz
2020 年 11 月 28 日
clash 的 socks 代理有点问题,建议使用 corkscrew 配合 http 代理使用

具体就是 15 楼的 ProxyCommand 稍微改一下,这里以 clash 默认的 7890 端口做演示(此端口可为 http 或者 mixed port )
ProxyCommand corkscrew localhost 7890 %h %p
LengthMin
2020 年 11 月 28 日
git config --global http.https://github.com.proxy http://127.0.0.1:7890

只让 https://github.com 走代理

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

https://www.v2ex.com/t/730171

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

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

© 2021 V2EX