风雨飘摇网

git 报Unable to negotiate ...错误解决方案

git 报Unable to negotiate ...错误解决方案

场景说明:

       安装了Gitblit(自架的误解代码仓库服务)发现部分电脑无法推代码,报错误如下:

Unable to negotiate with **** port 22: no matching host key type found. The决方ir offer: ssh-rsa

并排队了账户权限问题。

解决方案:

1.打开问题电脑的误解系统盘的当前登陆用户文件夹('C:\Users\你当前的账户名')

2.在这个文件夹中看是否有一个.ssh文件夹

 如果没有则需要通过命令(CMD)创建,分别通过如下三条命令

git config --global user.name "yourname"

git config --global user.email "your@email.com"

ssh-keygen -t rsa -C "your@email.com"

3.再次打开.ssh文件夹并在文件夹内创建config文件(注意无扩展格式),决方并配置内容

config 内容如下:

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

问题解决,误解全文结束

决方

未经允许不得转载:风雨飘摇网 » git 报Unable to negotiate ...错误解决方案