git配置密钥后无法pull

报错信息:

Unable to negotiate with 192.168.1.199 port 29418: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
fatal: Could not read from remote repository.

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

错误原因:ip受限,生成密钥前没有执行git init初始化config文件

解决方案:修改~/.ssh/config,加入

Host *
KexAlgorithms +diffie-hellman-group1-sha1

原文地址:https://www.cnblogs.com/Lucky-qin2013/p/6272622.html