OpenSSH升级到7.0+遇到的问题

1、当用git 执行git pull –rebase
遇到:
Unable to negotiate with xx.xx.xx.xx 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 clone 或者git pull前一步执行:
export GIT_SSH_COMMAND=’ssh -o KexAlgorithms=+diffie-hellman-group1-sha1’

2、git commit 的时候change id丢失(默认已具备gerrit的使用技能)
scp -P29418 xx@xx.xx.xx:hooks/commit-msg .git/hooks
遇到:
Unable to negotiate with xx.xx.xx.xx port 29418: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
原因:不能复制commit-msg文件,server端的OpenSSH还是老版本的,client已经用了7.0+了(很有可能已经用了新的2016款Mac,自带的OpenSSH已经是7.0+),当然很多时候我们并不能控制server端的版本。
解决:
(1)在之前的工程.git/hooks/commit-msg复制到新项目中(注意:不是这个文件commit-msg.sample)
(2)执行命令
chmod +x .git/hooks/commit-msg
echo “\nThe commit-msg hook was added to git hooks”

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值