Git ssh.exe has stopped working - windows-7

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.

Regarding the slow typing in git bash and cmd.exe, these other questions might have your answers:
https://superuser.com/questions/157194/typing-in-command-line-cmd-exe-is-very-slow
Msysgit bash is horrendously slow in Windows 7
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.

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.

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.

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.

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

Related

What is causing an access denied on executable MobaSCPRinew.exe when using MobaXterm on Windows

I've been a happy user of MobaXterm for years, this is a great terminal and X-window manager on Windows to access Linux machine and others. Recently, possibly since I upgraded to Windows 11 or changed laptop, I sometimes get the following error window:
An error occurred while starting the following MobaXterm subprocess:
"%APPDATA%\MobaXterm\slash\bin\MobaSCPRinew.exe"
Access is denied
I could not figure out which action is triggering this error but it is pretty rare and seems to happen either when I switch from one tab to another or when I unlock my computer after a while but I can't reproduce it systematically. I'm using MobaXterm Personal Edition v22.0 Build 4858.
This executable exists on my system and the file properties mention that this is a "Command-line SCP/SFTP client". However, even after the error, the SSH Browser available in the side bar (provided you only show one tab) is still visible and working.
Does anybody know what could be causing this?
Thanks
[EDIT]
I contacted the support of MobaXterm:
they told me it is a known bug related to the "Remote Monitoring" feature, which can display stats about memory, disk usage, connected users,...
advised me to test the preview version 22.2 since the bug seems fixed in that release
I used it for a few days and the issue never happened. I will download the latest official release 22.1 and, if it happens also in that one, will wait for the official 22.2. I will close this issue once the bug is fixed in an official release.
Same issue here, with some slight differences:
Location seems to be the "Documents" folder of my "Onedrive":
E:\OneDrive - xyz\Documents\MobaXterm\slash\bin\MobaSCPRinew.exe"
I use the "professional edition" with the same license ID, so I suppose technically it is the same software.
Issue only popped up till now after a reboot of my system, launching the MobaXterm and subsequently starting an ssh session.
Restarting MobaXterm only (once) didn't produce the issue.
I now upgraded to 22.1. Since the release notes do not mention anything concerning this issue, I can't know for sure the problem will be solved. I'll report back when it reoccurs.
Johan

Configure Git Remote server with Putty For Windows Pc

right now i'm working on my school's development department.
Lately we've gotten a Ubuntu Server, I mean, the school has given us the server with Ubuntu OS.
The last week my boss said that he wanted to use Git on the server, but all our machines have Windows OS.
I've been searching a lot of information about doing this but i noticed that the information is mostly too old and obsolete.
I don't really know the exactly way to to this, i mean, i know that i need to update the server (sudo apt-get update), then install Git and assign the global user email and name, after that, get the ssh keygen but is in this point where i don't know what to do, because in some of the web tutorials they use their machines whit different OS.
Is there any proven new way to solve this problem? ->Configure with windows the private Git server and then use it with windows machines?
If you mean setup a Git server on Windows, no need for putty.
Install:
Git for Windows
Gitea.io (very simple setup: just one exe to copy, that's it)
And you have a Git server on Windows!

Why is only my Git for Windows slow when I'm not on my company's domain?

My Git for Windows (Win10) is slow with everything: starting Git Bash (20 secs), executing commands like cd or even a mere return; 6 seconds after each command). But, this is only when I work at home with the laptop (no VPN), Git works fine on the same laptop when I'm at the office (a Windows Domain). My colleagues do not experience these lags at home with their laptops, but I found out they never shut down their computers. I tried the same, and then Git isn't slow. So, what might cause the lag when I restart my laptop at home?
My .gitconfig does not contain UNCs.
Git garbage collecting did not help.
I reinstalled Git, the latest version (2.12.2.windows.2).
Oh, and my edits show different names for who edited in BitBucket when working at home (mailadres) or at the office (user#domain).

TortoiseGit asking for password on password-less login setup

After months of uninterrupted password-less work, my TortoiseGit started to ask me for a password on some of my remotes, when pushing / pulling. I'm seeking a solution to fix this, as this can drive me crazy.
To underline: I want to remain on SSH-based password-less login, so any solutions that assume adding password to URL or permanently storing password in TortoiseGit configuration is not an option for me.
What I found out so far:
My problem is not related to GitHub; I don't use it in TortoiseGit and it happens on other remotes.
I do have SSH, not HTTPS, address as repo's URL and I don't have git clone-like stuff in it.
I can push/pull the same repository using Netbeans (and my Netbeans has Select Configured Git Repository Location option checked, so it uses the same remote configuration).
I can't push/pull remote using Git GUI, reason the same: asking for user password.
This is not related to a particular system or machine (SSH key), as it happens on both my work computer (32-bit Win 7) and home one (64-bit Win 7). Both of course uses different SSH key (see comment to this answer, which claims, that problem is related to 32-bit version of Windows; this is not true, it happens on 64-bit Windows as well).
Repository, this happens on, isn't empty -- I heard and even been personally affected, that sometimes TortoiseGit gets wako and asks for password on password-less login remote, until that remote is empty.
This is not related to a particular remote -- TortoiseGit works fine, without asking for password on some repositories (i.e. BitBucket) but "dies" asking for it on some other (i.e. in local dev network).
To make things even worse, there are certain remotes, on which TortoiseGit on my home computer fails, asking for password, while the very same remote accessed from home computer works just fine. And vice-versa. I set both machines for password-less login using the same steps; only SSH keys differs.
Things I did so far (and didn't solve the problem):
Changing SSH client (TortoiseGit -> Settings -> Network) to both Git\bin\ssh.exe (as suggested in here) and to C:\Program Files\PuTTy\plink.exe.
Using credential helper doesn't helped and I heard that it works for HTTPS only, not for SSL.
Downloading git-credential-wincred.exe and putting it to Git for Windows / msysgit folder didn't help as well; I've already had it there (different version / filesize; checked on both).
This issue is clearly bind to asking for user password, so git did not exit cleanly (exit code 128) error following it doesn't have any other source except missing password and most solutions given here, like crashed git, locked file, missing user e-mail are not solution for me.
OK, that's the farest point I've reached. And still nothing. Can anyone come up with something new, that I should try to solve this issue?
I confirm that "storing password" or _netrc file, or any credential helpers are for https url only, and have nothing to do with SSH.
The usual debugging ssh steps apply, starting by making sure that %HOME% is defined when TortoiseGit is launched, and %HOME%/.ssh exists, and contains the default keys id_rsa and id_rsa.pub.
In a git bash session, you can do a ssh -Tvvv yourRemoteServer to see what the debug error message sequence is, as explained here.
You also can check the result of a GIT_TRACE=2 git push test master, to see if the issue is limited to TortoiseGit and if the verbose output leaves any clue (see here).
Try switching ssh client between putty and openssh to see if TortoiseGit fairs better with one or the other.
The issue appeared yesterday and it took me 2-3 hours of trying all sorts of stuff to fix it. I also contacted server administrator, who claimed not to have done any changes in config in the past days. Hence I put bounty on this question. I also gave it a try today, but still negative. Finally, right now, I made another attempt just to copy the message to my friend, and, all of the sudden, all my repos started to work!
I am absolutely sure I didn't touch configs, it must have been some sort of timeout which took more than 16 hours. I have no idea what the problem was. All I can conclude is that waiting till the next day might help...

How to setup PC and Mac for using git

I use git both for Mac and PC.
When pulling Mac's git from PC, it's easy as I can use ssh.
git clone smcho#prosseek:~/smcho/setup
The problem happens the other way round : to pull from Mac. I guess there are two ways to go.
Method 1 : Connect to server
By using 'connect to server' in Mac, I can make PC's directory like that of Mac. Even though, the file permission issue, it works pretty well.
Method 2 : ssh
I could run cygwin ssh server (cygrunsrv -S sshd) to be accessed from other computers, but for me, I have to wait quite a while to get connection as I explained here. It's almost impossible for to use it with git, as I don't want to wait for minutes to get clone.
Here comes my question.
Is there any better way other than the previous two methods?
Is there a (natural) way to support ssh server from Windows (windows 7 precisely) not using cygwin?
I've started using the philosophy of trying to stick in the native environment that something is designed for.
With that in mind, my windows box has an ubuntu server virtual machine that hosts my git repositories. The nice thing is the linux + virtual box + git is an awesome source repository that is completely free. No extra machine and you can give it very little memory so it isn't a resource hog.
There is even another option:
If you use both computers for developing and just want to keep the repositories in sync, you could create a bare repository and use something like Dropbox to synchronize it.
I see two other solutions :
using a third synchronisation server: GitHub, the most famous (if your program is OpenSource), but you can also find free online private Git repositories
on Windows, you can set up the Git server ('git daemon' command). On MAC, you'll access to the Windows repository using the URL git://ip_of_windows_machine/repository/
You might consider another approach entirely. If you're using git as a revision control system that you might consider a hosted account for mastering your repository, maintaining backups, etc. http://github.com/ is the leader in the space for git.

Resources