解决no matching host key type found. Their offer: ssh-rsa fatal: Could not read from remote repository

本文讲述了作者在Windows系统中遇到的Git拉取代码时因ssh-rsa公私钥不匹配的问题,提供了检查config文件并手动添加正确配置的方法来解决此问题。
摘要由CSDN通过智能技术生成

一、现象

本人Windows系统,今天在用git拉代码的时候,本地生成好了ssh-rsa的公私钥,bitbucket上面也配置上了这个秘钥,检查了好几遍都没问题,但是就是拉不了代码,git clone的时候一直报错:
no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

二、解决方法

1. 到C:\Users\Administrator.ssh路径下的查看config文件是否存在。
请添加图片描述
2. 若不存在则手动创建该文件,并且填入以下信息。

Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

请添加图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值