美文网首页
gitlab迁移后ssh key不能使用问题

gitlab迁移后ssh key不能使用问题

作者: 运维大湿兄 | 来源:发表于2020-04-20 17:39 被阅读0次
[root@iZ2zegzZ ~]# git clone **cat.git
Cloning into '_cat'...
The authenticity of host 'git.zhugelicai.com (******)' can't be established.
RSA key fingerprint is SHA256:lhZR8eSNJtQW8PA8Uro26343YFj80jFdE.
RSA key fingerprint is MD5:87:0c:e9:9:f5:d6:3d:10:8b:ea:58:91:58:2e:ca.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '*#**.com,******' (RSA) to the list of known hosts.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

这是因为,git通过的ssh协议连接的,ssh配置必须允许git用户连接。
/etc/ssh/sshd_config设置了用户限制。
添加如下就可以了。
AllowUsers git

相关文章

网友评论

      本文标题:gitlab迁移后ssh key不能使用问题

      本文链接:https://www.haomeiwen.com/subject/pcqjihtx.html