moliliang
V2EX  ›  问与答

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

  •  
  •   moliliang · Jun 23, 2015 · 13981 views
    This topic created in 4153 days ago, the information mentioned may be changed or developed.

    例如咱们要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 replies  •  2019-01-29 10:47:10 +08:00
    Busy
    Busy
    Jun 23, 2015
    1
    $ 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
    402645707
    Jun 23, 2015
    2
    看上去是nginx的流量转发,
    表示自己搭了一个用来下googlevideo的
    不过不敢公开
    moliliang
    moliliang
    OP
    Jun 23, 2015
    3
    @Havee 没错,今天注册的
    moliliang
    moliliang
    OP
    Jun 23, 2015
    4
    @402645707 是的, ssh克隆是 haproxy
    moliliang
    moliliang
    OP
    Jun 23, 2015
    5
    @Havee 关键是你关注这个干嘛呢,什么东西没一个开始。
    Busy
    Busy
    Jun 23, 2015
    6
    @moliliang 不,从https -> http,比较谨慎
    clino
    clino
    Jun 23, 2015
    7
    改成 git:// 试试
    moliliang
    moliliang
    OP
    Jun 23, 2015
    8
    @Havee 那就用ssh呀。
    moliliang
    moliliang
    OP
    Jun 23, 2015
    9
    @Havee 况且如果只是clone的话,github又不需要你输出帐号密码。你要push代码,修改 .git/config 中的 url地址为github的地址就好了。
    moliliang
    moliliang
    OP
    Jun 23, 2015
    10
    @clino git:// 我没试过呢。你试试看?
    moliliang
    moliliang
    OP
    Jun 23, 2015
    11
    @Havee 还有就是,从https -> http是不可控的。我又没有github的https的证书。也是无解。
    Daniel65536
    Daniel65536
    Jun 23, 2015 via iPad
    12
    @moliliang SNI代理
    moliliang
    moliliang
    OP
    Jun 23, 2015
    13
    @Daniel65536 没看懂
    clino
    clino
    Jun 23, 2015
    14
    @moliliang git:// 我当然试过了是可用的, 你可以试试会不会更快
    hging
    hging
    Jun 23, 2015
    15
    为什么不自己开shadowsocks 然后在git的配置文件里加proxy呢. git又不是不支持sock5代理
    moliliang
    moliliang
    OP
    Jun 23, 2015
    16
    @hging 这样也是可以的
    ThreeBody
    ThreeBody
    Jun 23, 2015 via Android
    17
    @moliliang 他说的是sni代理支持https全文转发,无需解密
    moliliang
    moliliang
    OP
    Jun 23, 2015
    18
    @ThreeBody 最开始我用haproxy 直接绑定443端口,直接转发https,但是。你的https请求的 host必须是github.com ,否则github那边会报错。haproxy又不能在tcp层修改你的请求host。
    phoenixlzx
    phoenixlzx
    Jun 23, 2015
    19
    https 用 sniproxy
    moliliang
    moliliang
    OP
    Jun 23, 2015
    20
    @phoenixlzx 我试试看
    moliliang
    moliliang
    OP
    Jun 23, 2015
    21
    @phoenixlzx 没啥意义啊,跟haproxy一样。除非本地修改host指定我们的服务器ip,然后进行https clone,但是用户怎么浏览github啊。。所以还是之前的方案好了。
    @Daniel65536
    heaventear
    heaventear
    Mar 27, 2017
    22
    不用这么麻烦,其实就需要挂个梯子,我用的是天路加速器, 看他们官网的命令行加速教程 https://91tianlu.com/knowledgebase.php
    heaventear
    heaventear
    Apr 8, 2017
    23
    一劳永逸的解决办法是挂个加速器,教程在这里 https://91tianlu.cn/knowledgebase.php?action=displayarticle&id=7
    explore8989
    explore8989
    Jan 29, 2019
    24
    上面的链接挂了, 教程在这里 91tianlu.agency/knowledgebase.php?action=displayarticle&id=7
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3029 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 62ms · UTC 11:15 · PVG 19:15 · LAX 03:15 · JFK 06:15
    ♥ Do have faith in what you're doing.