无法与Mina部署协商密钥交换方法 [英] Unable to negotiate a key exchange method with Mina deployment

查看:87
本文介绍了无法与Mina部署协商密钥交换方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用Mina进行部署时,我遇到了类似的消息,但不确定为什么Git无法提取存储库.

I'm encountering a message like this while deploying with Mina, but not sure why Git is not able to pull the repo.

由于无法协商密钥交换方法消息,我尝试切换sshd_config,但仍然无法解决问题.感谢您的帮助.

I've tried switching sshd_config due to Unable to negotiate a key exchange method message, but still can't figure things out. Thanks for helping.

   -----> Creating a temporary build path
          $ touch "deploy.lock"
          $ mkdir -p "$build_path"
          $ cd "$build_path"

   -----> Cloning the Git repository
          $ git clone "git@github.com:repo/project.git" "/home/deploy/project/scm" --bare
          Cloning into bare repository '/home/deploy/project/scm'...
          Unable to negotiate a key exchange method
          fatal: Could not read from remote repository.

          Please make sure you have the correct access rights
          and the repository exists.
    !     ERROR: Deploy failed.

   -----> Cleaning up build
          $ rm -rf "$build_path"
          Unlinking current
          $ rm -f "deploy.lock"
          OK

    !     Command failed.
          Failed with status 1 (19)

推荐答案

问题是,您的本地SSH客户端和GitHub上的远程端点无法就通用的密钥交换方法达成共识.

The issue is, that your local SSH client and the remote endpoint at GitHub are unable to agree on a common key exchange method.

大多数情况是在您使用一组可用的密钥交换方法或您使用的是很老的&过时的SSH客户端,不支持任何仍被认为是安全的方法.

This will mostly occur when you poked around with the set of available Key exchange methods or you are using a very old & outdated SSH client which does not support any method which is still regarded as safe.

有趣的是,这仅发生在 some GitHub Repos上:我仍然能够从其他报告中提取信息.

Interestingly this only occurs on some GitHub Repos: I'm still able to pull from other reports.

要进行诊断,您可以设置以下环境变量以查看更多SSH输出:

To diagnose you can set the following environment variable to see more of the SSH output:

export GIT_SSH_COMMAND="ssh -vv"

要修复此问题,我在 config_ssh 〜/.ssh/.config 中添加了一个自定义条目,从而允许该主机使用更多旧式算法.请注意,它应该出现在主机* 部分的上方:

To fix it, I added a custom entry in my config_ssh or ~/.ssh/.config allowing more legacy algorithms for that host. Please note this should appear above any Host * section:

# Github needs diffie-hellman-group-exchange-sha1 some of the 
# time but not always.
Host github.com
    KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1

这篇关于无法与Mina部署协商密钥交换方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆