gerrit环境部署在linux服务器,windos客户机链接gerrit进行代码操做:linux
在windows客户机下载Git客户端git
在“Git Bash”里使用 ”ssh-keygen -t rsa -C wangshibo@zhongho.com"产生公私钥windows
将公钥上传到gerrit上(wangshibo帐号下,注册帐号是wangshibo@zhongho.com)服务器
在Git Bash里使用git clone克隆代码的时候,报错以下:ssh
unable to negotiate with 10.0.0.8: no matching key exchange methodfound. Their offer: diffie-hellman-group1-sha1 spa
解决办法:blog
在执行git clone以前,在终端输入:
export GIT_SSH_COMMAND='ssh -o KexAlgorithms=+diffie-hellman-group1-sha1'部署
而后再进行git clone操做it
若是还有报错,能够在windows本机.ssh目录下编辑config文件终端
内容以下:
Host 103.10.86.30
KexAlgorithms +diffie-hellman-group1-sha1
这样,报错问题就迎刃而解了。