当前位置:   article > 正文

【Mac系统下配置gitlab的SSH Key密钥时git clone无法拉取】_ed25519 key fingerprint is sha256

ed25519 key fingerprint is sha256

第一次使用mac系统的电脑配置SSH密钥,公司的项目都放在gitlab上托管,所以想从gitlab上clone下来项目的话就要配置SSH Key,然后才能使用Clone with SSH拉取文件。
结果输入git clone <git@gitlab.xxx>之后
出现了以下提示:

The authenticity of host 'gitlab.qwq360.com (10.0.158.52)' can't be established.
ED25519 key fingerprint is SHA256:S+V22OTBMw7eD+9/pFcpH2SlFdOJhjAdG3HDXxqbTEQ.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?
  • 1
  • 2
  • 3
  • 4

此时一定要输入yes才能顺利clone,千万记得!!!,不要默认为空,否则clone不下来

The authenticity of host 'gitlab.insta360.com (10.0.158.52)' can't be established.
ED25519 key fingerprint is SHA256:S+V22OTBMw7eD+9/pFcpH2SlFdOJhjAdG3HDXxqbTEQ.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'gitlab.insta360.com' (ED25519) to the list of known hosts.
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 64010 (delta 0), reused 0 (delta 0), pack-reused 64000
Receiving objects: 100% (64010/64010), 753.75 MiB | 10.93 MiB/s, done.
Resolving deltas: 100% (29514/29514), done.
Updating files: 100% (4459/4459), done.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

配置SSH Key的步骤如下:

$ ssh-keygen -t rsa -C "your_email@youremail.com"
  • 1

1.输入上述命令后,我们这使用默认的一路回车就行。成功的话会在~/下生成.ssh文件夹,进去,打开id_rsa.pub,复制里面的key。

2.回到gitlab上,点击右上角头像进入 preferences,左边选择SSH Keys,Add SSH Key,title随便填,粘贴在你电脑上生成的key。

3.配置完成后直接git中输入git clone xxx就可以像上面一样拉取了,注意一定要输入yes, 输入yes之后,.ssh文件下就会自动添加进来known_hosts文件了。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/999414
推荐阅读
相关标签
  

闽ICP备14008679号