碰到 github clone 很慢?这样解决试试看?! - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
moliliang
V2EX    问与答

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

  •  
  •   moliliang 2015-06-23 13:42:14 +08:00 13241 次点击
    这是一个创建于 3765 天前的主题,其中的信息可能已经有所发展或是发生改变。

    例如咱们要clone这个项目:
    git clone [email protected]:molisoft/gollum.git
    那么将地址修改为
    git clone [email protected]: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

    24 条回复    2019-01-29 10:47:10 +08:00
    Havee
        1
    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
        2
    402645707  
       2015-06-23 14:04:20 +08:00
    看上去是nginx的流量转发,
    表示自己搭了一个用来下googlevideo的
    不过不敢公开
    moliliang
        3
    moliliang  
    OP
       2015-06-23 14:05:46 +08:00
    @Havee 没错,今天注册的
    moliliang
        4
    moliliang  
    OP
       2015-06-23 14:06:18 +08:00
    @402645707 是的, ssh克隆是 haproxy
    moliliang
        5
    moliliang  
    OP
       2015-06-23 14:07:11 +08:00
    @Havee 关键是你关注这个干嘛呢,什么东西没一个开始。
    Havee
        6
    Havee  
       2015-06-23 14:09:13 +08:00
    @moliliang 不,从https -> http,比较谨慎
    clino
        7
    clino  
       2015-06-23 14:11:20 +08:00
    改成 git:// 试试
    moliliang
        8
    moliliang  
    OP
       2015-06-23 14:12:20 +08:00
    @Havee 那就用ssh呀。
    moliliang
        9
    moliliang  
    OP
       2015-06-23 14:13:46 +08:00
    @Havee 况且如果只是clone的话,github又不需要你输出帐号密码。你要push代码,修改 .git/config 中的 url地址为github的地址就好了。
    moliliang
        10
    moliliang  
    OP
       2015-06-23 14:14:47 +08:00
    @clino git:// 我没试过呢。你试试看?
    moliliang
        11
    moliliang  
    OP
       2015-06-23 14:27:40 +08:00
    @Havee 还有就是,从https -> http是不可控的。我又没有github的https的证书。也是无解。
    Daniel65536
        12
    Daniel65536  
       2015-06-23 14:28:27 +08:00 via iPad
    @moliliang SNI代理
    moliliang
        13
    moliliang  
    OP
       2015-06-23 14:39:00 +08:00
    @Daniel65536 没看懂
    clino
        14
    clino  
       2015-06-23 14:45:42 +08:00
    @moliliang git:// 我当然试过了是可用的, 你可以试试会不会更快
    hging
        15
    hging  
       2015-06-23 15:11:26 +08:00
    为什么不自己开shadowsocks 然后在git的配置文件里加proxy呢. git又不是不支持sock5代理
    moliliang
        16
    moliliang  
    OP
       2015-06-23 15:12:20 +08:00
    @hging 这样也是可以的
    ThreeBody
        17
    ThreeBody  
       2015-06-23 15:33:04 +08:00 via Android
    @moliliang 他说的是sni代理支持https全文转发,无需解密
    moliliang
        18
    moliliang  
    OP
       2015-06-23 15:48:44 +08:00
    @ThreeBody 最开始我用haproxy 直接绑定443端口,直接转发https,但是。你的https请求的 host必须是github.com ,否则github那边会报错。haproxy又不能在tcp层修改你的请求host。
    phoenixlzx
        19
    phoenixlzx  
       2015-06-23 15:54:04 +08:00
    https 用 sniproxy
    moliliang
        20
    moliliang  
    OP
       2015-06-23 16:15:09 +08:00
    @phoenixlzx 我试试看
    moliliang
        21
    moliliang  
    OP
       2015-06-23 17:24:27 +08:00
    @phoenixlzx 没啥意义啊,跟haproxy一样。除非本地修改host指定我们的服务器ip,然后进行https clone,但是用户怎么浏览github啊。。所以还是之前的方案好了。
    @Daniel65536
    heaventear
        22
    heaventear  
       2017-03-27 10:12:16 +08:00
    不用这么麻烦,其实就需要挂个梯子,我用的是天路加速器, 看他们官网的命令行加速教程 https://91tianlu.com/knowledgebase.php
    heaventear
        23
    heaventear  
       2017-04-08 17:10:14 +08:00
    一劳永逸的解决办法是挂个加速器,教程在这里 https://91tianlu.cn/knowledgebase.php?action=displayarticle&id=7
    explore8989
        24
    explore8989  
       2019-01-29 10:47:10 +08:00
    上面的链接挂了, 教程在这里 91tianlu.agency/knowledgebase.php?action=displayarticle&id=7
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1040 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 22:58 PVG 06:58 LAX 15:58 JFK 18:58
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86