git-for-windows / git

A fork of Git containing Windows-specific patches.
http://gitforwindows.org/
Other
8.34k stars 2.53k forks source link

ssh-sk-helper (FIDO2/U2F ssh support) missing dependencies #5213

Open peterh opened 4 days ago

peterh commented 4 days ago

ssh-sk-helper.exe cannot run, because it is missing a handful of dependencies. To work around this issue, I copied the following DLLs from C:\Program Files\Git\usr\bin to C:\Program Files\Git\usr\lib\ssh:

msys-2.0.dll
msys-cbor-0.11.dll
msys-crypto-3.dll
msys-fido2-1.dll
msys-gcc_s-seh-1.dll
msys-z.dll

Full environment details:

2525 appears to be the original feature request, but does not say anything about this issue.

Setup

C:\> git --version --build-options

git version 2.47.0.windows.1
cpu: x86_64
built from commit: d53e4648cb65eb75dd8d8a093d17400a18a9a15d
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
feature: fsmonitor--daemon
libcurl: 8.10.1
OpenSSL: OpenSSL 3.2.3 3 Sep 2024
zlib: 1.3.1

(Same with the previous couple of versions too)

Windows 11 22H2

C:\> cmd.exe /c ver

Microsoft Windows [Version 10.0.22621.4169]
C:\> type "C:\Program Files\Git\etc\install-options.txt"

Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable FSMonitor: Disabled

Tested a YubiKey "Security Key C NFC" (not to be confused with the YubiKey "5C NFC", which looks the same but has more features) and a Hypersecu "HyperFIDO Pro Mini"

Details

cmd

ssh-keygen -t ed25519-sk, add the id_ed25519_sk.pub to github, gitlab, or "servername", ssh servername

Prompt to touch security key, followed by ssh connection to server.

ssh-sk-helper.exe crashed, there was no security key prompt, and the ssh connection did not complete.

No specific repository.

dscho commented 1 day ago

shell-path: D:/git-sdk-64-build-installers/usr/bin/sh

That seems not exactly to be a supported scenario. Have you not installed this via the official installer? I ask because when I run ssh-keygen -t ed25519-sk from a regular Git Bash, as installed by the regular Git for Windows v2.47.0 installer, I do not get a crash, but a couple of dialogs until one asks for a USB security key to be inserted.