May 2021
所以:这是真的SSH Git 操作现在支持安全密钥 https://github.blog/2021-05-10-security-keys-supported-ssh-git-operations/,正如本月初(2021 年 5 月)在 GitHub 上宣布的那样,但是,,仍然存在问题。
您的错误消息看起来像是 Debian 上正在发生的错误:“问题 980393:/usr/bin/ssh-keygen -t ecdsa-sk失败并显示“密钥注册失败:格式无效” https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=980393".
它是本月仍在报道中 https://twitter.com/ndm/status/1391915400829411328.
如果这也失败了-t ecdsa
,尝试并使用OpenSSH 的插件,用于通过本机 Windows Hello API 连接到 FIDO/U2F 安全密钥 https://github.com/tavrez/openssh-sk-winhello可能有帮助。
Type export SSH_SK_HELPER=/usr/lib/ssh/ssh-sk-helper.exe
首先,如所见tavrez/openssh-sk-winhello issue 1 https://github.com/tavrez/openssh-sk-winhello/issues/1.
检查您的 OpenSSH 版本至少为 8.2。我这边使用的是最新的 Windows 版 Git:
ssh -V
OpenSSH_8.5p1, OpenSSL 1.1.1k 25 Mar 2021
The OP 机器人机器人 https://stackoverflow.com/users/5245525/droiddroid添加评论 https://stackoverflow.com/questions/67639931/how-do-i-get-my-yubikey-to-work-with-ssh-in-windows-10#comment119635748_67657004:
尽管如此,我现在遇到了 GitLab 还不支持安全密钥的问题:问题 213259 https://gitlab.com/gitlab-org/gitlab/-/issues/213259
2022 年 2 月:GitLab 现在应该支持这些安全密钥。
See 亚搏体育appGitLab 14.8 https://about.gitlab.com/releases/2022/02/22/gitlab-14-8-released/#support-for-ecdsa-sk-and-ed25519-sk-ssh-keys(2022 年 2 月)
支持 ecdsa-sk 和 ed25519-sk SSH 密钥
OpenSSH 8.2 https://www.openssh.com/releasenotes.html#8.2添加了对 FIDO/U2F 硬件验证器的支持
ecdsa-sk 和 ed25519-sk 密钥类型。
GitLab 现在支持这些密钥类型,允许用户利用硬件支持的 SSH 身份验证。
https://about.gitlab.com/images/14_8/ssh_key.png https://about.gitlab.com/images/14_8/ssh_key.png-- 支持 ecdsa-sk 和 ed25519-sk SSH 密钥
See 文档 https://docs.gitlab.com/ee/ssh/#generate-an-ssh-key-pair-for-a-fidou2f-hardware-security-key and Issue https://gitlab.com/gitlab-org/gitlab/-/issues/213259.