Handle ssh known hosts addition prompt
- PR Description
Show acknowledgement dialog if ssh host key is not known by any other names.
Fix #3205.
- Please check if the PR fulfills these requirements
- [x] Cheatsheets are up-to-date (run
go generate ./...) - [x] Code has been formatted (see here)
- [x] Tests have been added/updated (see here for the integration test guide)
- [x] Text is internationalised (see here)
- [x] Docs have been updated if necessary
- [x] You've read through your own file changes for silly mistakes etc
Thanks for raising this @gmlexx . Could you update the confirmation message so that it's clear that it's talking about an unknown SSH host? The user may not have the command log showing.
@jesseduffield it looks like prompt input doesn't have this information, it's just the line Are you sure you want to continue connecting ...
@gmlexx the fact that the line mentions a fingerprint makes it likely referring to SSH. So we could tell the user 'It appears that you're attempting to connect to an unknown SSH host. Continue?'
@jesseduffield the line about fingerprint isn't passed to the checkForCredentialRequest function as the scanner reads git output line by line. Probably it's possible to save such a "context" somewhere for better prompting, but IDK if it worth for that complication.