lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Handle ssh known hosts addition prompt

Open gmlexx opened this issue 1 year ago • 1 comments

  • PR Description

Show acknowledgement dialog if ssh host key is not known by any other names.

image

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

gmlexx avatar Jul 08 '24 19:07 gmlexx

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 avatar Aug 23 '24 23:08 jesseduffield

@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 avatar Aug 31 '24 10:08 gmlexx

@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 avatar Jan 03 '25 00:01 jesseduffield

@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.

gmlexx avatar Jan 03 '25 08:01 gmlexx