项目实战 git拉取代码失败

项目实战 git拉取代码失败

从服务器拉取代码时拉取失败 提示

Unable to negotiate with 172.17.12.189 port 29418: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

在这里插入图片描述

这是git的ssh支持算法没配置,那么先在C:\User.ssh\下新建文件config,写进如下代码:

C:\Users\zhangmj2.ssh

在这里插入图片描述

Host *

KexAlgorithms +diffie-hellman-group1-sha1

提示

在这里插入图片描述

在刚才的文件中添加认证方式

Host *

KexAlgorithms +diffie-hellman-group1-sha1
HostkeyAlgorithms +ssh-dss,ssh-rsa
PubkeyAcceptedKeyTypes +ssh-dss,ssh-rsa

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_48824655/article/details/129842926