-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Popup SSH unknown host prompt on git push #5025
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
Popup SSH unknown host prompt on git push #5025
Conversation
This fixes jesseduffield#4057. Lazygit got unresponsive on SSH unknown host prompt before this change.
| Passphrase | ||
| PIN | ||
| Token | ||
| UnknownHostVerification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry that it's not a credential technically. Tell me if there's better approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referred to push_with_credential_prompt.
|
Thanks; I tested this and it works well. However, I'm unsure if the user interface is good enough. We don't show any information about which host we are trying to connect to, what its fingerprint is etc. I worry that this is inviting people to simply type "yes" without further checking. (Now honestly, that's probably what most people do at the console prompt too, but still. We need to take security seriously.) You could argue that the information is visible in the command log in the lower right corner, but not everybody has that panel open by default (I don't). I think the ideal user interface would be a panel that contains all the information that is shown for the command-line prompt, and then a text field for typing "yes/no" below it. Unfortunately we don't have such a widget, and it would be a bit of work to build it, I'm afraid. I can see two options around this:
|
|
Thank you for your review. Your worry makes sense. The former option looks somewhat too hard to me. The latter one is inconvenient but somewhat better than current behavior, hanging. I'll take the latter later if it's acceptable to you. As another approach, denying "yes" and requiring finferprint to resume might be good choice for security. But probably it's also difficult to me (not sure at all yet). |
Is the difference so big really? I mean, it's not hanging in the sense that lazygit is unresponsive and needs to be killed from another terminal, is it? That would be bad. But you can still just press
Interesting, that's useful to know. I wonder though if there's a way to populate your containers up front with a known_hosts file that has your hosting provider's public keys, so that you don't have this problem. |
I was confused. Actually lazygit itself doesn't hang. I agree that it might not be worth the effort.
Yes there is. I consider to add known public keys. Thank you. I close this PR since it doesn't look valuable enough. Maybe it will progress when:
|
PR Description
This fixes #4057. Lazygit got unresponsive on SSH unknown host prompt before this change.
Please check if the PR fulfills these requirements
go generate ./...)If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)Docs have been updated if necessary