Git 加速---目前正在用的方法,个人觉得挺有效果的

2021-03-09 16:38:27 +08:00
 justin2018

有飞机场


终端 shell 是 zsh:

# where proxy
proxy() {
  export http_proxy="http://127.0.0.1:端口号"
  export https_proxy="http://127.0.0.1:端口号"
  export all_proxy="socks5://127.0.0.1:端口号"
  echo "HTTP Proxy on"
}

# where noproxy
noproxy() {
  unset http_proxy
  unset https_proxy
  unset all_proxy
  echo "HTTP Proxy off"
}

使用,终端输入proxy


~/.ssh/config 配置

Host github.com
    HostName github.com
    User git
    IdentityFile 密钥
    ProxyCommand nc -v -x 127.0.0.1:端口号 %h %p //这个是 socks5 的代理

chrome 插件

chrome 商店 搜索GitHub 加速 目前用的是这个


使用proxychains-ng

通过 ProxyChains-NG 实现终端下任意应用代理 - 奇妙的 Linux 世界

https://www.hi-linux.com/posts/48321.html


速度上基本上杠杆的~~

1086 次点击
所在节点    分享发现
7 条回复
puzzle9
2021-03-09 17:10:46 +08:00
我想起来了一个神奇的网站 https://github.com.cnpmjs.org/
litchinn
2021-03-09 17:55:41 +08:00
@puzzle9 厉害了
Dvel
2021-03-09 18:41:05 +08:00
我直接写了
```
Host *
ProxyCommand nc -X 5 -x 127.0.0.1:xxxx %h %p
```
justin2018
2021-03-09 19:23:07 +08:00
@Dvel 666 学习了 老哥
no1xsyzy
2021-03-10 12:50:51 +08:00
@Dvel 如果你是 Host *,那么你可以把 ProxyCommand 不缩进
虽然不太确定是否有 edge case……
no1xsyzy
2021-03-10 12:55:08 +08:00
@no1xsyzy s/不缩进 /放开头 /
看了下,差异是放开头 global 不会被覆盖……
好吧,大约还是 `Host *` 好点……
chioplkijhman
2021-03-11 09:30:44 +08:00
git config --global http.proxy http://127.0.0.1:1088
git config --global https.proxy http://127.0.0.1:1088

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

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

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

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

© 2021 V2EX