-->

Github for windows - ssh-agent.exe using high CPU

2019-03-17 20:10发布

问题:

I've just installed Github for Windows on my Windows 8.1 machine and it appears to work fine except that my machine performance drops down dramatically.

Looking at task manager I see that ssh-agent.exe is using a constant 25% CPU (no doubt 100% of one of my cores) and the disk usage is at 100%.

I have had a look on the Internet but can't find any reference to what might be causing this.

Any ideas what might be causing this and how to resolve it?

UPDATE:

I can kill the process and GitHub for Windows appears to keep working but the ssh-agent.exe process starts up again as soon as I close and restart Github for Windows.

回答1:

We've seen this happen on occasion due to a race condition between ssh-agent and anti-virus software competing over resources. Do you have any anti-virus software installed? Would you be able to temporarily turn it off and see if the problem persists? We'd be very keen to dig deeper into this if you could reach out to support@github.com.



回答2:

Further to moggizx's comment in one of the other answers, I found this was influenced by SourceTree too.

The instance of ssh-agent.exe with the high CPU actually gets terminated when you close SourceTree. Restarting SourceTree does cause another ssh-agent process to be spawned, but the CPU is then idle.



回答3:

I found the same issue, my solution was to add the file and the process C:\Program Files\Git\usr\bin\ssh-agent.exe to exclusion list in Windows Defender on Windows 10.



回答4:

The reason this happens is most likely that your git repository is huge. Probably you have mistakenly instantiated it in a folder where you have an enormous amount of files. So git loops over them constantly and thus takes up alot of processing power needlessly. You can try and delete your .git folder(s) and this should stop.

Try and initialize your git repo in a folder where you exclusively use your projects.

I would still consider this to be a sort of bug, because we should be notified if this happens(we shouldn't need to find out by opening task manager).