6

I am on Windows 7, 64 bit, and have installed msysgit to work with my github repositories. On my old laptop (32 bit, also windows 7), git ran with no problems, but now git bash runs slowly (I type a command and it takes a couple of seconds for it to actually show up, character by character). When I try to push changes it works intermittently, but more often than not a dialog box comes up saying that "ssh.exe has stopped working...". I click cancel on that, and retry the command. Eventually, it works, asking for my authentication code. Once it gets to that step, it pushes without issue. It's just getting to that step that is the issue.

So basically, my problems are:

  • git runs slowly on most commands, even typing them in is slow before I execute the command
  • git bas (ssh.exe) stops working when pushing, works intermittently.

I have reinstalled windows since this issue popped up and that did not fix it.

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
imkingdavid
  • 1,411
  • 13
  • 26
  • Is anything eating a lot of CPU when typing into git bash? Also, have you tried going to an older version of msysgit to see if it's some bug that's been introduced recently? – millimoose Jan 08 '12 at 19:48
  • Have a look in task manager when it's running slowly, you'll probably see something eating CPU there. – Joachim Isaksson Jan 08 '12 at 19:49
  • explorer.exe's cpu usage jumps up from about 1 to 24 when I type in the bash window. No other programs noticeably spike. – imkingdavid Jan 08 '12 at 20:00
  • @Inerdial I haven't tried older versions, but I also haven't seen anyone else reporting any such issues recently, so I don't know if it's a bug in msysgit or something with my own environment. – imkingdavid Jan 08 '12 at 20:01
  • As an update, even after reinstalling Git (with latest version) and trying to use git via cmd.exe by adding it to window's path (which is also slow, btw) neither issue is resolved. – imkingdavid Jan 18 '12 at 00:24
  • If commands typed into git bash echo slowly, then you've got a problem that's not related to ssh. Is your system's performance outside git bash equally slow (typing commands into a cmd.exe window, or typing URLs into your browser)? – Keith Thompson Feb 04 '12 at 21:23
  • cmd.exe, bash, etc. are slow, all other typing in the browser or word or any other program is lightening fast. Also when I type in cmd or bash, it spikes explorer's CPU usage, making me unable to do anything while it is adding the characters. – imkingdavid Feb 05 '12 at 01:33
  • I had similar problems (GIT bash stopped working).. Reason was, that my AV software (Comodo) sandboxed one of the processes it shouldn't (don't remember which)... Turn of all security software you have and try again... This is just a guess so bare with me.. :) – PrimosK Feb 05 '12 at 14:38
  • @PrimosK turning off my AV (microsoft security essentials) did not remedy the situation. – imkingdavid Feb 05 '12 at 18:11
  • 2
    Isn't this a question for Superuser.com? Git being used by a programmer doesn't make Git client administration a programming question. – Oleg Mikheev Feb 09 '12 at 21:11
  • 1
    @Qwe - this site is for questions about [software tools commonly used by programmers](http://stackoverflow.com/faq) – ChrisF Feb 12 '12 at 12:19
  • @ChrisF This question is about interactive use of a command line shell. Just because this shell is called “git bash”, and its primary purpose is to run git, doesn't mean that programmers are best equipped to answer it. This is fundamentally a question about using MSys. Or it may be a problem with ssh, it's difficult to tell. Either way, this is a computer user question, which belongs on SU. – Gilles 'SO- stop being evil' Feb 12 '12 at 12:27
  • I am seeing this on a git pull (vista enterprise sp 2) – boardtc Feb 27 '12 at 14:41

5 Answers5

0

I also faced this issue. ssh.exe, the one which git was using, was also being used by OpenSSH which I was running to connect to my US office. I've also installed TortoiseSVN which has its own ssh.exe.

I uninstalled Git and while re-installing I configured Git to use the ssh.exe that's part of TortoiseSVN, and this problem went away.

slm
  • 15,396
  • 12
  • 109
  • 124
Ankush Chhabra
  • 166
  • 2
  • 11
  • Good to know. I'll keep this in mind for future reference, but my computer actually just suddenly started working a couple of months ago, perhaps because of a recent Windows Update. Thanks for pointing this out. – imkingdavid Jan 20 '13 at 00:27
0

I faced the same issue today. Disabled the antivirus and it worked perfectly.

Hitesh
  • 147
  • 2
  • 16
0

Intermittent push, fetch and other remote commands are an indication of not enough concurrent ssh connections allocated in whatever your central repo is hosted on. Bump up the configuration to allow more concurrent secure connections. This is especially true if you are using something like gitolite or gitosis which use one user to allow access to all git users and differentiate the user based upon the public key provided.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
0

Regarding the slow typing in git bash and cmd.exe, these other questions might have your answers:

The first has a solution when you're running a Lenovo Laptop (are you running on one by any chance?).

Since you indicated that even after a Windows re-install you're having the same issue, I would think it's related to hardware or some service or piece of software installed for this specific hardware.

I would also try running git bash as Administrator and see if that makes a difference.

Your SSH issue could be dependent on the other one, so I would solve the slow typing issue first.

Community
  • 1
  • 1
Tom De Leu
  • 8,144
  • 4
  • 31
  • 30
  • Thanks for the answer. I am on an HP laptop, and don't have the IPS Core Service that they indicated might be the issue (I've also seen that as a suggested solution elsewhere). I have already looked into the second link you provided but it didn't help. I have bash running as an administrator automatically, and have tried disabling the network connection, starting bash, and then starting the network. None of those work. – imkingdavid Feb 10 '12 at 15:08
  • Well I still haven't solved the issue but the bounty expires in a few hours so I'm going to give it to you size you tried. Thanks. – imkingdavid Feb 11 '12 at 15:47
  • Thanks, that's generous as I didn't really solve your problem. Another idea (found at http://www.technologyquestions.com/community/threads/slow-typing-in-command-window.63347/): reboot into safe mode, see if the typing is faster in cmd.exe and git bash. If it is, have a look at which Windows services are started, then check the difference with those running in normal mode. Stop those services in normal mode one by one until you find the culprit. – Tom De Leu Feb 11 '12 at 19:54
  • Thanks. Safe mode makes typing much faster, so I'll have to check on what service is slowing it down. – imkingdavid Feb 11 '12 at 23:34
  • As a note, I forgot to accept an answer in this question. Because I gave the bounty here, I figured I'd mark this as accepted as well. As an update, my computer is suddenly working. Perhaps a recent Windows Update has fixed the issue, I'm not sure. Anyway, there's no more problem. Thanks for the help! – imkingdavid Dec 04 '12 at 15:48
0

I have the same configuration: Win 7 64bit, Msysgit and github. I'we faced the "ssh.exe has stopped working" problem as you did, when pushing to github.

I solved it by using another ssh.exe: I installed Cygwin, and copied over all the binaries to the git's binary folder.

I think that if during the msysgit installation, you specify an external ssh client to use, you can avoid this hack, but at the moment this seemed like a good idea.

Andras Balázs Lajtha
  • 2,576
  • 25
  • 32