2016-09-14 52 views
-1

我遇到这个错误:配置OpenSSH时应该使用什么用户名?

$ git fetch ssh://[email protected]:XXXXX/ xxx && git checkout FETCH_HEAD 
Unable to negotiate with 192.168.XXX.XXX: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 
fatal: Could not read from remote repository. 

这是他们建议在OpenSSH的网站是什么:

For the case of the above error message, OpenSSH can be configured to enable the diffie-hellman-group1-sha1 key exchange algorithm (or any other that is disabled by default) using the KexAlgorithms option - either on the command-line:

ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 [email protected] 

它并没有出现在文档的作者,它可能并不清楚[email protected]应该。你能为我填写这些信息吗?我尝试了我的gerrit登录,但没有奏效。

回答

1
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 [email protected] 

这只是一个例子,意思是“如果你试图ssh [email protected],看到了上述误差然后提供-oKexAlgorithms=+diffie-hellman-group1-sha1选项ssh

当混帐的引擎盖下使用ssh ,您必须通过~/.ssh/config文件提供该选项:

Host gerrit.XXXXX 
    KexAlgorithms +diffie-hellman-group1-sha1 
相关问题