-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Check if SSH_AUTH_SOCK
env var is set before trying to use the SSH agent.
#987
base: master
Are you sure you want to change the base?
Conversation
Fixes the ssh cloning test on computers that don't have a correctly setup ssh agent (as the keys in `~/.ssh` will be used instead)
SSH_AUTH_SOCK
env var is set before trying to use the SSH agent.
@lapfelix Being relatively unfamiliar with this portion of the codebase, does libssh2 not support accessing passphrased sah keys? |
hmm it would definitely be possible to support passphrased ssh keys, and GitUp could save the passphrase in the keychain. (In theory though the ssh agent should "just work" but in practice, I'm not sure why it's not super reliable and why it sometimes needs to be kickstarted after a reboot) |
I guess I'm trying to figure out what this particular PR is trying to improve. Wouldn't this environment variable be set as long as ssh-agent was running? Is this just meant to short circuit the case where it isn't? |
Yes basically I didn't find any straightforward way to retry calling the This PR helps cases where the ssh agent isn't running, but maybe there's a more "correct" solution to the problem. Like I wonder when line 455 ever executed, for instance |
For some reason I seem to be failing in Really should setup Xcode Cloud after this to have some easy CI wins. |
It seems that when running tests, the But, why does that difference exist? I'm not familiar with how Xcode runs things enough, and looking at the schemes, I didn't find anything obvious that'd explain the difference. |
Ya it's strange as I know this passed previously without change to this. And yes cloning this repo via SSH in app does work. |
Fixes the cloning test through ssh (
GCSingleCommitRepositoryTests
'stestClone
) on computers that don't have a correctly setup ssh agent, like mine 🥴 (as the keys in~/.ssh
will be used instead, and that's going to work as long as they're not protected by a passphrase).If
SSH_AUTH_SOCK
isn't there, it will fail later on anyway when libgit2 uses libssh2.Should also make ssh agent workarounds like this one unnecessary: #161 (comment)
I AGREE TO THE GITUP CONTRIBUTOR LICENSE AGREEMENT