异常问题:

  下班之前升级了一下Git的版本,结果第二天过来拉取远程最新代码的时候就提示了下面的异常问题:

Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa
Git failed with a fatal error.
Git failed with a fatal error.
Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists. 

问题分析:

  通过翻译上面的报错信息大概说的是没有匹配到类型为ssh-rsa的主机秘钥。或者是可能你的代码仓库权限没有了。

于是我上代码托管平台看了下我的项目权限是否被修改了,结果发现没有变更(这个可能性别排除了)。然后既然是ssh-rsa秘钥的问题,我就是试着把本机的ssh-key重生生成了一次再去托管平台添加,然后依旧还是包这个错。

解决方案一,切换成HTTPS的方式

1、修改本地代码关联的远程地址

git remote set-url origin https://gitee.com/ysgdaydayup/pingrixuexilianxi.git

2、重新拉取成功 

git pulll

解决方案二、在.ssh文件中创建config文件并添加配置 

添加如下匹配:

第一行说明对所有主机生效,当然你也可以指定对应主机地址;

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

Reference

https://www.cnblogs.com/daibeisi/p/15662546.html

Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)的更多相关文章

  1. Visual Studio 2022 git error Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa

    前言 前两天因为升级了Git导致git提交拉取的时候都提示下面这个异常,然后经过一番折腾以后终于把这个问题解决了.但是今天我升级了下Visual Studio 2022将其升级到了17.1.3版本然后 ...

  2. 记一次使用git报错,解决Unable to negotiate with **** port 22: no matching host key type found. Their offer: ssh-rsa

    windows电脑重装系统,去官网下载了最新的git安装,一路next下来,打开bash按老路子设置,生成公钥 git config --global user.name "yourname ...

  3. How to solve the error "Field service in com.xx.xxx.xxxx required a bean of type 'com.aa.bb.cc' that could not be found."

    When runung a SpringBoot demo, I  got a error as following: *************************** APPLICATION ...

  4. javax.el.PropertyNotFoundException: 类型[xx.xxx.xxxx]上找不到属性[xxxx]

    今天在JSP利用EL表达式取值报了 "javax.el.PropertyNotFoundException" 1 Caused by: org.apache.jasper.Jasp ...

  5. 执行xxx.sh脚本的两种方式

    因公司测试环境的登录模式有2种,大佬们直接写了个脚本完成一键切换,看了其中的脚本文件,其中出现了send "sh out.sh\r":一直疑惑这里的sh out.sh的意思...查 ...

  6. ssh: connect to git@gitlab.xxxxx.com:xxxxx.git port 22: Connection refused

    公司服务器上的gitlab项目添加了ssh密钥,但是操作时却报错ssh: connect to git@gitlab.xxxxx.com:xxxxx.git port 22: Connection r ...

  7. git clone 报错Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

    在执行git clone命令报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange metho ...

  8. Git clone 报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc

    git clone 报错 Unable to negotiate with xxx.xxx.xxx.xxx. port 12345: no matching cipher found. Their o ...

  9. Unable to open the physical file xxxx. Operating system error 2

    在新UAT服务器上,需要将tempdb放置在SSD(固态硬盘)上.由于SSD(固态硬盘)特性,所以tempdb的文件只能放置在D盘下面,而不能是D盘下的某一个目录下面. ALTER  DATABASE ...

随机推荐

  1. tp 5 三级联动查询(自写)

    思路: 1.定义路由 2.查询顶级分类(pid=0)发送至制图 3.循环展示 4.给顶级分类下拉框绑定内容改变事件(JS:onchange.JQ:change) 5.获取到选中的option的valu ...

  2. k8s命令行web代理神器gotty

    目录 介绍 安装 使用示例 -p 指定端口 -c 指定账号密码 -w 支持tty交互 --permit-arguments 支持get参数传参 --random-url 生成随机地址 --reconn ...

  3. yum源出现 AppStream‘ 缓存失败,忽略这个 repo。同步仓库 ‘base‘ 缓存失败,忽略这个 repo 的问题解决办法

    今天安装Wget时出现如下错误 到 /etc/yum.repos.d/目录下编辑CentOS-Base.repo ,更改为如下内容. vim CentOS-Base.repo # CentOS-Bas ...

  4. 程序语言与编程实践2-> 蓝桥杯C/C++备赛记录1 | 入门了解与首周训练

    寒假前班主任帮我们报了名,是得好好准备准备.作为一个CSer,coding能力一定不能太弱.我反思,好久没写C/C++代码了,净是些随手写的python脚本,刚开始上手题目bug一大堆. 由于也不是啥 ...

  5. 一比一还原axios源码(八)—— 其他功能

    到此,我们完成了axios的绝大部分的功能,接下来我们来补全一下其他的小功能. 一.withCredentials  这个参数可以可以表明是否是一个跨域的请求.那这个的使用场景是啥呢?就是我们在同域的 ...

  6. Play商店显示需要进行身份认证。您需要登录自己的Google帐户

    前段时间把一加6系统从H2OS换到OxygenOS,Play商店死活不能登录,网络配置等问题已经排除,重装Google全家桶也没有解决问题,最后找到原因. 解决办法:在应用列表中找到Google Pl ...

  7. futter环境安装

    镜像下载.域名解析.时间同步请点击 阿里巴巴开源镜像站 Flutter是谷歌开发的一款开源.免费的基于Dart语言的UI框架,可以快速在IOS和Android上构建高质量的原生应用.它的最大的特点是跨 ...

  8. 【SVN】Please execute the 'Cleanup' command.

    背景 项目有个新的bug,我需要提取一个新的分支,但是提取之后,更新分支出现了这个问题 Please execute the 'Cleanup' command. 原因 由于使用SVN更新文件出错,导 ...

  9. 6月12日 python学习总结 框架

    1. 登录功能的实现 1. form表单提交数据的注意事项: 1. 是form不是from,必须要有method和action 2. 所有获取用户输入的表单标签要放在form表单里面,表单标签必须要有 ...

  10. Rocket Mq 常用API 及简单运维

    RocketMQ 常用API 消息 消息消费模式 消息消费模式由消费者来决定,可以由消费者设置MessageModel来决定消息模式. 消息模式默认为集群消费模式 consumer.setMessag ...