【问题标题】:Unable to clone project from remote repository无法从远程存储库克隆项目
【发布时间】:2021-04-16 23:29:16
【问题描述】:

我已经通过 gitbash 生成了 ssh 密钥并在 gerrit 上添加了密钥。之后,当我尝试克隆项目时,我得到了关注.. /// 无法与 10.136.96.136 端口 29418 协商:找不到匹配的密钥交换方法。他们的提议:diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 致命:无法从远程存储库读取。请确保您具有正确的访问权限并且存储库存在。

【问题讨论】:

    标签: git ssh gerrit


    【解决方案1】:

    如果您遵循文档“Set Up SSH Keys in Gerrit”,您应该能够test your connection(在尝试任何克隆之前)

    你应该看到:

     $ ssh -p 29418 sshusername@hostname
    
        ****    Welcome to Gerrit Code Review    ****
    
        Hi John Doe, you have successfully connected over SSH.
    
        Unfortunately, interactive shells are disabled.
        To clone a hosted Git repository, use:
    
        git clone ssh://sshusername@hostname:29418/REPOSITORY_NAME.git
    
      Connection to hostname closed.
    

    因此,请确保 ssh 守护程序正在您的 Gerrit 服务器上运行,并监听 29418 端口。
    确保使用公钥更新 ~gerrituser/.ssh/authorized_keys

    最后,检查是否必须enable some legacy options
    例如,测试:

    ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 p 29418 sshusername@hostname
    

    (将gerritusersshusername 替换为正确的远程Gerrit 用户帐户)
    (并用远程 Gerrit 服务器主机名替换 hostname

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-02
      • 1970-01-01
      • 1970-01-01
      • 2022-06-11
      • 2015-02-27
      • 2017-10-17
      相关资源
      最近更新 更多