Git Clone is too slow

后端 未结 3 1375
囚心锁ツ
囚心锁ツ 2021-01-31 05:42

This is my first time to construct the git server. When I use TortoiseGit-1.8.1.0-32bit to handle the operation, everything is fine!

But if i use the git clone

相关标签:
3条回答
  • 2021-01-31 05:52

    Maybe you can fetch only the latest revision first and then fetch the rest:

    $ git clone --depth=1 git@github.com:joe/hello-world.git
    $ cd hello-world
    $ git fetch --unshallow
    

    Thanks this article!

    0 讨论(0)
  • 2021-01-31 05:55

    There are two issues at play here:

    1. Your OpenSSL is not up to date
    2. The SSH protocol is slower than HTTPS (but not by much)

    Part 1. OpenSSL

    After following the directions from the article, http://darrell.mozingo.net/2011/09/29/painfully-slow-clone-speeds-with-msysgit-gitextensions/, I successfully boosted my network throughput for the git clone operation from 1 MiB/s to 28 MiB/s. This result was achieved by upgrading OpenSSL from version 0.9.8e to version 1.0.1e.

    Part 2. SSH protocol

    The SSH protocol a little bit slower than the HTTPS protocol, but not enough to warrant the speed differences I mentioned in Part 1 or what you are seeing. Please read through this article for more information on the Git protocols: http://media.pragprog.com/titles/tsgit/chap-008-extract.html.

    0 讨论(0)
  • 2021-01-31 06:14

    If you, like me, have configured TortoiseGit to use Putty's plink to connect (and use pageant, etc...), this might help you:

    Try enabling in Putty (Default Settings) the following settings:

    1. SSH -> Auth: "Allow agent forwarding" (I believe this is the one that changes "everything")
    2. SSH -> "Enable Compression"
    3. Session -> Select "Default Settings" -> Save

    For me, this resulted in going from 143.00 KiB/s to 4.50 MiB/s

    Hope this helps.

    0 讨论(0)
提交回复
热议问题