美文网首页
git克隆代码失败Cloning into 'demo'...

git克隆代码失败Cloning into 'demo'...

作者: 欠儿不登 | 来源:发表于2022-03-14 12:07 被阅读0次

git克隆代码失败Cloning into 'demo'... Unable to negotiate with x.x.x.x: no matching host key type found. Their offer: xxx
编辑ssh配置,.ssh/config,如果config文件不存在,则新建一个,加入以下内容

Host *
KexAlgorithms +diffie-hellman-group1-sha1
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

原因如下:

失败问题1

Cloning into 'demo'...
Unable to negotiate with x.x.x.x: no matching host key type found. Their offer: diffie-hellman-group1-sha1
解决办法

KexAlgorithms +diffie-hellman-group1-sha1

失败问题2

Cloning into 'demo'...
Unable to negotiate with x.x.x.x: no matching host key type found. Their offer: ssh-rsa
解决办法

HostkeyAlgorithms +ssh-rsa

失败问题2

Cloning into 'demo'...
x.x.x.x: Permission denied (publickey)
解决办法

HostkeyAlgorithms +ssh-rsa

相关文章

网友评论

      本文标题:git克隆代码失败Cloning into 'demo'...

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