1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-04 10:34:55 +02:00
lazygit/pkg/commands/oscommands
Bartłomiej Dach 1a1f042f49 Add credential prompts for U2F-backed SSH keys
The 8.2 release of OpenSSH added support for FIDO/U2F hardware
authenticators, which manifests in being able to create new types of SSH
key, named `ecdsa-sk` nad `ed25519-sk`. This is relevant to lazygit,
as those SSH keys can be used to authorise git operations over SSH, as
well as signing git commits. Actual code changes are required for
correct support, as the authentication process for these types of keys
is different than the process for types supported previously.

When an operation requiring credentials is initialised with a U2F
authenticator-backed key, the first prompt is:

	Enter PIN for ${key_type} key ${path_to_key}:

at which point the user is supposed to enter a numeric (and secret) PIN,
specific to the particular FIDO/U2F authenticator using which the SSH
keypair was generated. Upon entering the correct key, the user is
supposed to physically interact with the authenticator to confirm
presence. Sometimes this is accompanied by the following text prompt:

	Confirm user presence for key ${key_type} ${key_fingerprint}

This second prompt does not always occur and it is presumed that the
user will know to perform this step even if not prompted specifically.
At this stage some authenticator devices may also begin to blink a LED
to indicate that they're waiting for input.

To facilitate lazygit's interoperability with these types of keys, add
support for the first PIN prompt, which allows "fetch", "pull", and
"push" git operations to complete.
2022-11-30 13:34:32 +11:00
..
cmd_obj_builder.go refactor 2022-01-07 10:52:51 +11:00
cmd_obj_runner_default.go more refactoring 2022-01-09 14:09:53 +11:00
cmd_obj_runner_win.go add deadlock mutex package 2022-08-07 11:16:14 +10:00
cmd_obj_runner.go Add credential prompts for U2F-backed SSH keys 2022-11-30 13:34:32 +11:00
cmd_obj.go fix(loaders/file.go): changed to ignore stderr when loading git status 2022-09-19 18:46:32 +09:00
copy.go no more naked returns 2022-03-25 23:27:28 +11:00
dummies.go use tempdir in tests to prevent polluting worktree 2022-11-13 14:10:21 +11:00
fake_cmd_obj_runner.go fix(loaders/file.go): changed to ignore stderr when loading git status 2022-09-19 18:46:32 +09:00
gui_io.go formatter 2022-09-17 15:10:41 -07:00
os_default_platform.go update tests 2022-01-04 09:07:15 +11:00
os_test_default.go run integration tests in parallel and properly cache windows build 2022-06-11 13:06:29 +10:00
os_test_windows.go update tests 2022-01-04 09:07:15 +11:00
os_test.go remove deprecated calls 2022-09-17 15:10:41 -07:00
os_windows.go update tests 2022-01-04 09:07:15 +11:00
os.go remove deprecated calls 2022-09-17 15:10:41 -07:00