Using “KexAlgorithms diffie-hellman-group1-sha1” did not resolve “no matching key exchange method found” error

后端 未结 5 655
挽巷
挽巷 2021-01-04 17:43

There\'s a lot of questions about the following error, but they all have same solution which did not have any effect:

$ git push
Unable to negotiate with 192         


        
相关标签:
5条回答
  • 2021-01-04 18:05

    I resolved a similar problem on Windows 10 by updating my version of Open SSH to the latest (7.5p1-1) and then making sure that C:Program Files\OpenSSH\bin was the first entry in the system path so it used that ssh.exe and not any others.

    0 讨论(0)
  • 2021-01-04 18:16

    Resolved by using this command I randomly found in some comment thread:

    export GIT_SSH_COMMAND='ssh -o KexAlgorithms=+diffie-hellman-group1-sha1'
    

    Must be called every time you open the Git Bash. Yeah, git is hell.

    0 讨论(0)
  • 2021-01-04 18:28

    I also faced the same issue.Please install the older version of "Git for Windows". https://github.com/git-for-windows/git/releases/tag/v2.17.1.windows.1 This version will solve your issue.

    0 讨论(0)
  • 2021-01-04 18:31

    I started getting this error after updating to "git for windows" to version 2.25.1 This algo was deprecated by GitHub in Feb. of 2018.

    @Kenster's comment on "use ssh -vv ..." to see where your config files live was key. My home drive in windows is a network drive so my default .ssh folder is on that network volume.

    Adding a file called "config" to that folder with:

    Host 127.0.0.1
    Port 2222
    KexAlgorithms +diffie-hellman-group1-sha1
    

    allowed me to connect to my vagrant environment again.

    0 讨论(0)
  • 2021-01-04 18:31

    I faced the same issue using Git for Windows 2.27.0.

    Git for Windows brings its own OpenSSH implementation. I had to change the config file C:\Program Files\Git\etc\ssh_config

    Host myhost@example.com
        Port 22
        KexAlgorithms +diffie-hellman-group1-sha1
        KexAlgorithms +diffie-hellman-group14-sha1
    
    
    0 讨论(0)
提交回复
热议问题