gitlab添加密钥后,git clone仍提示输入密码

先使用命令调试ssh连接是否成功$ ssh -vvvT git@hdss7-100.host.com

debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Offering public key: /c/Users/weidi/.ssh/id_rsa RSA SHA256:+B7XNfMXp2z7htcFP8cI0Cz6HhvvU4jUmajoDKDjzS0
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /c/Users/weidi/.ssh/id_dsa
debug3: no such identity: /c/Users/weidi/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /c/Users/weidi/.ssh/id_ecdsa
debug3: no such identity: /c/Users/weidi/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /c/Users/weidi/.ssh/id_ecdsa_sk
debug3: no such identity: /c/Users/weidi/.ssh/id_ecdsa_sk: No such file or directory
debug1: Trying private key: /c/Users/weidi/.ssh/id_ed25519
debug3: no such identity: /c/Users/weidi/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /c/Users/weidi/.ssh/id_ed25519_sk
debug3: no such identity: /c/Users/weidi/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /c/Users/weidi/.ssh/id_xmss
debug3: no such identity: /c/Users/weidi/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
git@hdss7-100.host.com's password:

出现以上报错
debug3: no such identity: /c/Users/weidi/.ssh/id_dsa: No such file or directory
但是我已经生成了这个文件的。

.ssh文件夹权限均是正确的。
经查是因为服务器seLinux设置问题,将远程服务器的seLinux设置为disabled关闭

[root@localhost ~]# vi /etc/selinux/config
SELINUX=disabled

然后重启机器使其生效。再使用git clone就成功了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值