[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
网友评论