Friday, June 25, 2010

Slow git fetch, pull and push on Ubuntu 10.04

With our recent attempt at migrating to git, a lot of issues were expected and this post documents one of them.

Some of our developers installed Ubuntu 10.04 and they are experiencing slow remote operation specifically git fetch, pull and push. I first suspected an error in the git server setup using indefero but the other users on Ubuntu 9.04 did not have this problem.

Investigating further, I found that using ssh to connect to the git server was also slow which could be the cause of the problem. To find out what happens during ssh connection I did:

ssh -v git@git-server

This revealed that ssh was spending a lot of time on using gssapi-with-mic.
To turn this off, I modified the file /etc/ssh/ssh_config to add

GSSAPIAuthentication no

Sure enough, the git operations improved and it has now stopped becoming a chore to do git fetch, pull and push.

I hope you found the post useful. You can subscribe via email or subscribe via a feed reader to get relevant updates from this blog. Have a nice day.

8 comments:

  1. Thanks, very useful. Solved my problem :-)

    Cheers

    ReplyDelete
  2. Anonymous9:43 PM

    Rock on, thanks

    ReplyDelete
  3. thank you, this fixed horribly slow updates for me!

    ReplyDelete
  4. Hi Kris, Jef and Mike,

    I'm glad I was able to help you with this post

    ReplyDelete
  5. In Ubuntu 12 things should be done differently.

    The file (ssh_config) already has
    GSSAPIAuthentication no
    but this is commented out

    Then at the bottom of the file you have
    GSSAPIAuthentication yes
    which needs to be commented

    ReplyDelete
  6. Well... I just came back here a second time. Some git connections still suffer from this problem in Ubuntu 12.04.

    ReplyDelete
  7. Ditto; I just started experiencing this issue this week. I'm guessing a change was pushed out to the ssh client in ubuntu. This fixed it!

    ReplyDelete
  8. Super helpful, thanks heaps.....

    ReplyDelete