之前通过git管理的一个项目,今天直接用eclipse通过ssh加入工程后,每次通过git命令行pull代码都报以下错误:

Unable to negotiate with 21.12.1.167 port 29418: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
       查了些资料,分析是git server和client使用的ssh key解析算法不一致造成的,client因为系统升级的原因默认使用新的key exchange method而服务器只提供diffie-hellman-group1-sha1方法,因此无法正常建立链接。
解决的方案是在.ssh目录下面新建一个config文件并在config文件中添加以下代码。

Host xx.xx.x.xxx
    KexAlgorithms +diffie-hellman-group1-sha1

其中 xx.xx.x.xxx为服务器的ip地址或者域名,这个config文件可以通过.git文件夹下的复制后修改。

一个git pull无法使用的问题的更多相关文章

  1. git 系统中 post-receive 钩子不能正常执行 git pull 解决方法

    有一个需求是本地git在push到远程 git repo 之后,在远程服务器上自动在/dir/foo下执行 git pull 的操作.想来是一个很简单的需求,不就是在远程的 foo.git 仓库中的 ...

  2. git pull时出现unable to unlink old 一个不该犯下的错误

    在日常开发中,当团队内有人将新的代码打成jar文件提交,并且未改名的时候,可能会出现这样的错误"error: unable to unlink old 'Test/lib/xxx-1.0.0 ...

  3. 使用 expect 重启失败的 git pull/push 操作

    问题的提出 最近使用 github 上传.下载项目代码时,经常会卡很久,有时候在命令行打了 git push 然后就去上厕所了,结果等我回来的时候,发现 push 早已经失败了,还得重新提交一下.如果 ...

  4. 聊下git pull --rebase

    有一种场景是经常发生的. 大家都基于develop拉出分支进行并行开发,这里的分支可能是多到数十个.然后彼此在进行自己的逻辑编写,时间可能需要几天或者几周.在这期间你可能需要时不时的需要pull下远程 ...

  5. git pull 冲突解决

    这个意思是说更新下来的内容和本地修改的内容有冲突,先提交你的改变或者先将本地修改暂时存储起来. 处理的方式非常简单,主要是使用git stash命令进行处理,分成以下几个步骤进行处理. 1.先将本地修 ...

  6. git pull 和本地文件冲突问题解决

    具体方法如下 git pull origin 分支 //出现错误 git stash  缓存起来 git pull origin 分支 git stash pop //还原 git stash cle ...

  7. 新创建一个git远程仓库

    1.git 服务器项目初始化已经完毕,请把相关的资料和源码上传到git服务器. 2.第一次需要clone,执行命令:git clone git@192.168.10.184:listenbox_mc_ ...

  8. [译]git pull

    git pull把git fetch和git merge压缩成了一条命令. 用法 git pull <remote> 作用和git fetch <remote> &&a ...

  9. Git Pull 避免用户名和密码方法

    在开发中使用的版本控制器时git , 每次使用命令"git pull"从服务器获得最新代码时,都需要输入用户名和密码,这样浪费了大量的时间和热情,在此背景下,本文在网上找到解决版本 ...

随机推荐

  1. 使用 LaTeX 绘制 PGM(Probabilistic Graphical Models)中的贝叶斯网络(bayesian networks)

    Software for drawing bayesian networks (graphical models) 这里需要调用 latex 中的绘图库:TikZ and PGF. 注意,下述 tex ...

  2. oracle 10g文件目录结构详解

    一个典型的oralce目录结构如下: /u01└── oracle    ├── admin (数据库管理文件位置,以实例划分)    │   ├── mydb    │   │   ├── adum ...

  3. linux查找keyword在php出现的次数

    查找CleverCode在当前文件夹以及子文件夹,全部的php出现大于0的次数. # find -type f -name '*.php' | xargs grep CleverCode ./*.ph ...

  4. android Fragment与Activity交互,互相发数据(附图具体解释)

    笔者最近看官方training.发现了非常多实用又好玩的知识. 当中.fragment与Activity通信就是一个. fragment与Activity通信主要是两点: 1.fragment传递信息 ...

  5. disabled的值无法传递到action层

    假设想让表单不可输入的状态,我将表单设置为了: style="cursor:not-allowed;" disabled 可是这样设置之后就发现,在后台的action怎么都没有办法 ...

  6. [RxJS] Use takeUntil instead of manually unsubscribing from Observables

    Manually unsubscribing from subscriptions is safe, but tedious and error-prone. This lesson will tea ...

  7. iOS开发Quarz2D 九:图片加水印

    #import "ViewController.h" @interface ViewController () @property (weak, nonatomic) IBOutl ...

  8. [Node.js] Take Screenshots of Multiple Dimensions for Responsive Sites using Nightmare

    When developing responsive websites, you will constantly be resizing your browser to make sure your ...

  9. todo bitnami

    https://bitnami.com/stack/dokuwiki https://bitnami.com/stack/jenkins/installer

  10. 【u004】数列

    Time Limit: 1 second Memory Limit: 128 MB [问题描述] 有这样一种数列A1.A2.A3.--An,其中A1=0,且对任意一项Ai满足|Ai-A(i+1)|=1 ...