1

When I run ssh-agent in gitbash, I get two processes one has 25% CPU the other 0, and gitbash hangs. If I use a git client and interact with the remote, I get ssh processes running at 12% CPU and the client hangs.

If I run "where ssh" I get the following:

C:\Program Files\Git\usr\bin\ssh.exe
C:\Windows\System32\OpenSSH\ssh.exe

Looking at other similar issues, I'm wondering if I'm getting a race condition between two processes due to two locations of ssh.

How are these locations managed? I've tried altering and deleting my GIT_SSH environment variable, but it's not having any impact.

I'm running Windows 10 and git version 2.30.1.windows.1

Fran Hoey
  • 895
  • 9
  • 18
  • `where ssh` tells you where Windows finds ssh. But in Git Bash, it's the bash PATH that matters. `which ssh` should tell you that in Git Bash, you'll be using `/usr/bin/ssh` and there should be no confusion. I think that `where` output is a red herring. That being said, I'm not sure how to troubleshoot your issue, sorry! – joanis Feb 25 '21 at 15:52

2 Answers2

1

I use the same Git For Windows, and get only only one process ssh-agent.exe when I execute ssh-agent from gitbash session.

But: I don't have C:\Windows\System32\OpenSSH in my PATH.

So check first if, in a CMD where you have redefined (for testing) your %PATH%, the issue persists.
See a simplified PATH as shown here.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

@vonC was correct, removing C:\Windows\System32\OpenSSH from my path solved the issue of multiple responses to "where". But I still had the same issue that ssh-agent would hang.

Finally tried the classic uninstall - reinstall and it worked.

  • Uninstall Git
  • Uninstall Fork Client (the git client I use)
  • Uninstall OpenSSH (add/remove programs -> Optional Features)
  • Re-install Fork Client
  • Re-install OpenSSH
Fran Hoey
  • 895
  • 9
  • 18