这个提示是正常的 SSH 第一次连接新主机时的安全确认提示,意思是:

这是第一次连接 gitcode.com 这个主机,系统还没有保存它的公钥指纹,想确认你是否信任它。


需要做的操作

  1. 输入 yes ,然后回车。

  2. 之后 SSH 会把 gitcode.com 的公钥指纹保存到你本地的 known_hosts 文件里,下次就不会再提示了。


示例过程:

ssh -T git@gitcode.com
The authenticity of host 'gitcode.com (116.205.2.91)' can't be established.
RSA key fingerprint is SHA256:aTlsy+4ARMC7nWyy5eKIqUkotk8yv7Jd+XXoP4EXj1Y.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitcode.com,116.205.2.91' (RSA) to the list of known hosts.
Hi username! You've successfully authenticated, but GitCode does not provide shell access.


如果看到类似上面最后一句 You've successfully authenticated... ,说明 SSH 配置成功了,可以正常使用 SSH 连接了。

接下来可以:

  • 用 SSH 方式克隆仓库了

  • 使用 git pullgit push 也会正常通过 SSH 认证

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐