Painfully slow clone speeds with msysgit & GitExtensions

UPDATE: See Paul’s comment below – sounds like the latest cygwin upgrade process isn’t as easy as it used to be.

If you install GitExtensions, up through the current 2.24 version (which comes bundled with the latest msysgit version 1.7.6-preview20110708), and use OpenSSH for your authentication (as opposed to Plink), you’ll likely notice some painfully slow cloning speeds. Like 1MB/sec on a 100Mb network kinda slow.

Thankfully, it’s a pretty easy fix. Apparently msysgit still comes bundled with an ancient version of OpenSSH:

$ ssh -V
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007

Until they get it updated, it’s easy to do yourself. Simply install the latest version of Cygwin, and make sure to search for and install OpenSSH on the package screen. Then go into the /bin directory of where you installed Cygwin, and copy the following files into C:\Program Files\Git\bin (or Program Files (x86) if you’re on 64-bit):

  • cygcrypto-0.9.8.dll
  • cyggcc_s-1.dll
  • cygssp-0.dll
  • cygwin1.dll
  • cygz.dll
  • ssh.exe
  • ssh-add.exe
  • ssh-agent.exe
  • ssh-keygen.exe
  • ssh-keyscan.exe

Checking the OpenSSH version should yield something a bit higher now:

$ ssh -V
OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011

Your clone speeds should be faster too. This upgrade bumped ours from literally around 1MB/sec to a bit over 10MB/sec. Nice.

8 Responses

  1. chantivlad Says:

    Thank you, i had exactly the same issue, and by investigating i also noticed that OpenSSH was very old.
    Really odd for an active recent project like msysgit IMO.

  2. Hadas Says:

    Thanks a lot, I already started banging my head in the wall. I can’t believe the didn’t fix it yet.

  3. Dinis Says:

    Hello,
    I tried this solution but didn’t help much.
    Although, I ended up finding a way to resolve the issue: http://stackoverflow.com/a/19285391/955072

    If you don’t want to use Putty’s plink, you might be able to use the information from that post to configure the same for msysgit ssh client (enable compression and agent forwarding).

  4. Kevin W. Says:

    With the version of Cygwin currently available, there are a lot more components that have to be copied over. I gave up doing this as I’d have to do it on two systems. Instead I switched to PuTTY and pscp. I’m already using it for SourceTree anyways so it wasn’t much work for me to setup.

  5. Daniel Earwicker Says:

    At last, mystery solved/fixed. Thanks very much for this.

    BTW the easiest way to ensure you have all the Cygwin components required, regardless of version, is to copy everything that matches:

    cyg*.dll

    and:

    ssh*.exe

    My clone speed is now x20.

  6. shlomicthailand Says:

    Thanks , saved me 3 hours of cloning. down to 10 minutes.

  7. Change OpenSSH & OpenSSL versions in Git Bash (msysgit) on Windows | BlogoSfera Says:

    […] question is, how do we upgrade these (safely, without breaking anything, etc.)? This article has a solution, but it only mentions upgrading OpenSSH, not OpenSSL, although I’m sure you […]

  8. Paul Lockwood Says:

    Thanks for taking the time to post this

    Note to others: On 23rd June 2014 this is not working with current builds of Git and Cygwin

    It appears the current version of OpenSSH attempts to store the SSH key in a different location

    After ~1.5 hours spent trying to update OpenSSH I opted to use https and investigate storing git credentials

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.