碰到 github clone 很慢?这样解决试试看?!

2015-06-23 13:42:14 +08:00
 moliliang

例如咱们要clone这个项目:
git clone git@github.com:molisoft/gollum.git
那么将地址修改为
git clone git@clonegithub.com:molisoft/gollum.git

github.com 改为 clonegithub.com

就好啦~

然后如果是http方式clone,那么是不支持https
例如:
https://github.com/molisoft/gollum.git
需要改为普通的http方式
http://clonegithub.com/molisoft/gollum.git

...试试看吧~ try try ..= =

clonegithub.com 是我注册的,然后是我搞的这么一个服务,为了的是解决大家的clone问题~ 然后~ 大项目挺吃流量的~ 能赞助一下极好:

http://www.vultr.com/?ref=6816448

12754 次点击
所在节点    问与答
24 条回复
Havee
2015-06-23 13:54:22 +08:00
$ whois clonegithub.com

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

Domain Name: CLONEGITHUB.COM
Registrar: HICHINA ZHICHENG TECHNOLOGY LTD.
Sponsoring Registrar IANA ID: 420
Whois Server: grs-whois.hichina.com
Referral URL: http://www.net.cn
Name Server: LV3NS3.FFDNS.NET
Name Server: LV3NS4.FFDNS.NET
Status: ok http://www.icann.org/epp#OK
Updated Date: 23-jun-2015
Creation Date: 23-jun-2015
Expiration Date: 23-jun-2016

>>> Last update of whois database: Tue, 23 Jun 2015 05:53:42 GMT <<<
402645707
2015-06-23 14:04:20 +08:00
看上去是nginx的流量转发,
表示自己搭了一个用来下googlevideo的
不过不敢公开
moliliang
2015-06-23 14:05:46 +08:00
@Havee 没错,今天注册的
moliliang
2015-06-23 14:06:18 +08:00
@402645707 是的, ssh克隆是 haproxy
moliliang
2015-06-23 14:07:11 +08:00
@Havee 关键是你关注这个干嘛呢,什么东西没一个开始。
Havee
2015-06-23 14:09:13 +08:00
@moliliang 不,从https -> http,比较谨慎
clino
2015-06-23 14:11:20 +08:00
改成 git:// 试试
moliliang
2015-06-23 14:12:20 +08:00
@Havee 那就用ssh呀。
moliliang
2015-06-23 14:13:46 +08:00
@Havee 况且如果只是clone的话,github又不需要你输出帐号密码。你要push代码,修改 .git/config 中的 url地址为github的地址就好了。
moliliang
2015-06-23 14:14:47 +08:00
@clino git:// 我没试过呢。你试试看?
moliliang
2015-06-23 14:27:40 +08:00
@Havee 还有就是,从https -> http是不可控的。我又没有github的https的证书。也是无解。
Daniel65536
2015-06-23 14:28:27 +08:00
@moliliang SNI代理
moliliang
2015-06-23 14:39:00 +08:00
@Daniel65536 没看懂
clino
2015-06-23 14:45:42 +08:00
@moliliang git:// 我当然试过了是可用的, 你可以试试会不会更快
hging
2015-06-23 15:11:26 +08:00
为什么不自己开shadowsocks 然后在git的配置文件里加proxy呢. git又不是不支持sock5代理
moliliang
2015-06-23 15:12:20 +08:00
@hging 这样也是可以的
ThreeBody
2015-06-23 15:33:04 +08:00
@moliliang 他说的是sni代理支持https全文转发,无需解密
moliliang
2015-06-23 15:48:44 +08:00
@ThreeBody 最开始我用haproxy 直接绑定443端口,直接转发https,但是。你的https请求的 host必须是github.com ,否则github那边会报错。haproxy又不能在tcp层修改你的请求host。
phoenixlzx
2015-06-23 15:54:04 +08:00
https 用 sniproxy
moliliang
2015-06-23 16:15:09 +08:00
@phoenixlzx 我试试看

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

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

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

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

© 2021 V2EX