10000 UI hangs when Git can't get SSH keys · Issue #1298 · sourcegit-scm/sourcegit · GitHub
[go: up one dir, main page]

Skip to content

UI hangs when Git can't get SSH keys #1298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alensiljak opened this issue May 9, 2025 · 4 comments
Closed

UI hangs when Git can't get SSH keys #1298

alensiljak opened this issue May 9, 2025 · 4 comments
Assignees
Labels
help-wanted Extra attention is needed

Comments

@alensiljak
Copy link
Contributor

When an SSH key is not available in the SSH agent, the application will hang, waiting for Git to complete the operation.
Other applications recognize this and report that a repo is unavailable or something similar.

For me, this happens when the password manager locks and removes the SSH keys from Pageant.
Could also happen that a key does not exist, etc.

@love-linger
Copy link
Collaborator

I'm not very familiar with Pageant. Are you using Putty? I can't reproduce this issue with my Windows/macOS/Linux devices using OpenSSH.

@love-linger love-linger self-assigned this May 9, 2025
@love-linger love-linger added the need-more-info Extra information or replay is needed label May 9, 2025
@alensiljak
Copy link
Contributor Author
alensiljak 8000 commented May 9, 2025

I'm not very familiar with Pageant. Are you using Putty? I can't reproduce this issue with my Windows/macOS/Linux devices using OpenSSH.

Yes, Pageant is the agent application that comes with Putty. I use it since KeepassXC can add keys to it automatically, whereas it would be more complicated with OpenSSH.

@love-linger love-linger added help-wanted Extra attention is needed and removed need-more-info Extra information or replay is needed labels May 9, 2025
@love-linger
Copy link
Collaborator

When an SSH key is not available in the SSH agent, the application will hang, waiting for Git to complete the operation.
Other applications recognize this and report that a repo is unavailable or something similar.

I don't think SourceGit needs to do anything here because the git process it runs has not exited yet (whether it exits normally or an error occurs). Take OpenSSH as an example. When the program specified by SSH_ASKPASS (which is set to SourceGit itself) does not return, such as when the user does not enter anything and does not close ask-pass dialog for a long time after it pops up, the git command process it belongs to will keep waiting. Therefore, SourceGit must also keep waiting.

@alensiljak
Copy link
Contributor Author
alensiljak commented May 9, 2025

Interesting. Here is a quick comparison. When I lock KeepassXC, the keys get removed from Pageant.

In Github Desktop, I get this error immediately if trying to fetch:

With SmartGit, this is also pretty quick:

Image

And, with SourceGit, the same:

Image

Thanks for the hint. I am a bit puzzled as to the conditions when the hang happens. I notice it usually after KPXC has locked itself automatically. This should have removed the key, just like it did when I lock it manually.
However, in those cases, the background Git process seems to hang and not return an error. I will inspect the process the next time it happens. At least SourceGit is handling it correctly. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants
0