Git fatal: Could not read from remote repository.

本文介绍了在尝试通过SSH连接远程仓库时遇到的'协商失败'和'主机密钥类型不匹配'错误的解决方法。通过检查~/.ssh/config文件,添加目标主机配置并指定兼容的HostKeyAlgorithms,可以成功解决此类问题,确保安全地连接到远程Git仓库。
摘要由CSDN通过智能技术生成

Unable to negotiate with x.x.x.x port xxxx: no matching host key type found. Their offer: ssh-rsa,ssh-dss fatal: Could not read from remote repository.

  1. 进入ssh文件夹,查看config. 如果没有,则创建一个
cd ~/.ssh/
vim config
  1. config中添加上目标host,即可
Host  x.x.x.x
HostKeyAlgorithms +ssh-rsa,ssh-dss
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值