相关疑难解决方法(0)

SSH 指纹与 Gitlab.com 不匹配

我在 上向我的帐户添加了 ED25519 公钥gitlab.com。然后我将.ssh/config私钥设置为Host gitlab.com

Host gitlab.com gitlab.*.com
    User git
    IdentityFile ~/.ssh/gitlab_ed25519
Run Code Online (Sandbox Code Playgroud)

当我执行 a 时git fetch,我会看到密钥的指纹:

The authenticity of host 'gitlab.com (35.231.145.151)' can't be established.
ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Run Code Online (Sandbox Code Playgroud)

然后我尝试验证它是否与我的计算机上的公钥匹配:

$ ssh-keygen -lf ~/.ssh/gitlab_ed25519.pub
256 SHA256:Gc/kdTZNJJ0AkdRuZmXOnZw77mS2+osIHQd0pRwJxZA comment (ED25519)
Run Code Online (Sandbox Code Playgroud)

这些不匹配。即使我在 上添加了 Ed25519 密钥gitlab.com,他们的 SSH 服务器仍然报告 ECDSA 密钥的指纹,这重要吗?不是应该说指纹来自ED25519吗?我究竟做错了什么?为什么指纹不匹配?

git ssh gitlab

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

git ×1

gitlab ×1

ssh ×1