异常问题:

  下班之前升级了一下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. 微信小程序表单验证(WxValidate使用)

    参考博客: https://www.cnblogs.com/zhangxiaoyong/p/10166951.html https://github.com/wux-weapp/wx-extend/b ...

  2. layui ajax删除

    表单页面 //监听行工具事件 table.on('tool(test)', function(obj){ var data = obj.data; //console.log(obj) if(obj. ...

  3. jmeter(二十八)利用beanshell进行多重断言

    在接口测试中,我们对返回结果的正确性判断一般是基于响应报文的返回内容进行断言.但有些时候,按照正常的业务逻辑来说,一个请求返回的内容是多种不同的. 比如:用户注册功能,注册成功是正常的返回messag ...

  4. centos7 安装mysql Package: akonadi-mysql-1.9.2-4.el7.x86_64 (@anaconda)

    wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release ...

  5. 华为交换机配置ACL详细步骤

    ACL 介绍 #2000-2999普通ACL,根据源IP过滤 #3000-3999高级ACL,根据源目的端口和源目的地址等过滤 #4000-4999二层ACL,根据源目的MAC等过滤 配置举例: 拒绝 ...

  6. nginx配置负载均衡分发服务器笔记

    记录学习搭建nginx负载均衡分发服务器的过程笔记 1.服务器IP:192.168.31.202(当前需要搭建nginx负载均衡分发的服务器)安装好nginx 2.在服务器IP:192.168.31. ...

  7. LGP5071题解

    我给这道题提供了314次提交qwq 题目大意 给定一个长为 \(n\) 的序列,每次询问给定一个 \(L\) 和 \(R\),求 \([L,R]\) 中所有数乘起来的质因数个数,答案对 \(19260 ...

  8. 人生苦短,我用JRebel

    昨天看到团子推送的一篇关于热部署的文章,其中介绍了自研的Sonic插件在公司内部的应用.同时晒出来一张对比图: 团子表示我们的插件要比同类插件优秀哦.不过我定睛一看,好家伙,第一列的JRebel在图中 ...

  9. java-快捷操作

    crtl+c crtl+v crtl+a crtl+x crtl+x剪切 crtl+z撤销 crtl+s保存 alt+f4关闭窗口 完全删除shift+delet widow+r运行程序 window ...

  10. 使用MariaDB backup恢复主从

    安装 yum install MariaDB-backup 备份命令 工具需要直接操作数据目录,需要在数据库服务器上执行 mariabackup --backup --target-dir=/data ...