Repository navigation
Improve SSH support with passphrase and host prompts - #12756
Merged
Merged
Conversation
sergiou87
marked this pull request as ready for review
August 11, 2021 12:22
sergiou87
force-pushed
the
ssh-add-host
branch
from
August 12, 2021 07:14
004012f to
f586e07
Compare
tidy-dev
approved these changes
Aug 12, 2021
tidy-dev
left a comment
Contributor
There was a problem hiding this comment.
✨ Tested it out and it works great! On little nit that you can ignore if you like.
|
|
||
| /** Should we use SSH askpass? */ | ||
| export function enableSSHAskPass(): boolean { | ||
| return __WIN32__ && enableBetaFeatures() |
Contributor
There was a problem hiding this comment.
Nit: Should the windows check be in the feature-flag? Just figured that once this goes in and someday we remove the feature flag.. will have to move the Windows check to inside the code somewhere.
Member
Author
There was a problem hiding this comment.
Yeah, I'm expecting to have something for macOS soon and remove that Win32 check, so it should be ok 🤞
|
Hi, would just like to chime in- as of 6 Feb 2025, Github Desktop encounters an infinite loop of 'cloning repository' when a SSH key with passphrase is used. Unsure if there are any workarounds- no prompts are appearing on my end. I am on Windows. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3457
Closes #8761
Description
This PR sits on top of #12734
The changes in this PR leverage the new TCP-based askpass trampoline from #11510, by providing that trampoline as the askpass program for SSH too.
That way, we can intercept when SSH prompts stuff to the user (like the SSH key passphrase or adding a host to the list of known hosts).
So far this is only available on Windows because macOS makes it a bit difficult to provide a custom SSH_ASKPASS program. That'll be tackled in a different PR.
Screenshots
Note: the video is kind of a lie, since github.com is added as a host automatically. Users will be prompted about other hosts, though.
Screen.Recording.2021-08-11.at.14.20.00.mov
Release notes
Notes: [Fixed] Prompt SSH info to Windows users, like the key passphrase or adding a host to the list of known hosts