第一次使用Mac系统的电脑配置ssh密钥,公司的项目都放在gitlab上托管,所以想从gitlab上clone下来项目的话就要配置SSH Key,然后才能使用Clone with SSH拉取文件。 结
第一次使用Mac系统的电脑配置ssh密钥,公司的项目都放在gitlab上托管,所以想从gitlab上clone下来项目的话就要配置SSH Key,然后才能使用Clone with SSH拉取文件。
结果输入git clone
之后
出现了以下提示:
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 namesAre you sure you want to continue connecting (yes/no/[fingerprint])?
此时一定要输入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 namesAre you sure you want to continue connecting (yes/no/[fingerprint])? yesWarning: 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 64000Receiving objects: 100% (64010/64010), 753.75 MiB | 10.93 MiB/s, done.Resolving deltas: 100% (29514/29514), done.Updating files: 100% (4459/4459), done.
配置SSH Key的步骤如下:
$ ssh-keygen -t rsa -C "your_email@youremail.com"
输入上述命令后,我们这使用默认的一路回车就行。成功的话会在~/下生成.ssh文件夹,进去,打开id_rsa.pub,复制里面的key。
回到gitlab上,点击右上角头像进入 preferences,左边选择SSH Keys,Add SSH Key,title随便填,粘贴在你电脑上生成的key。
配置完成后直接git中输入git clone xxx就可以像上面一样拉取了,注意一定要输入yes, 输入yes之后,.ssh文件下就会自动添加进来known_hosts文件了。
来源地址:https://blog.csdn.net/Asabc12345/article/details/126623828
--结束END--
本文标题: 【Mac系统下配置gitlab的SSH Key密钥时git clone无法拉取】
本文链接: https://lsjlt.com/news/416754.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0