Issue with cloning git repository
Appending the file C:\Program Files\Git\etc\ssh\ssh_config with below content worked for me:
KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
touch ~/.ssh/config
attach my ssh config for people who come across the same issue
## use kex algorithm ##
Host 10.172.4.66
KexAlgorithms diffie-hellman-group1-sha1
## Avoid Write failed : boken pipe issue ##
ServerAliveInterval 120
TCPKeepAlive no
use larger postBuffer if come accross another issue
fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed
$ git config --global http.postBuffer 10000000000000000000000000000000
$ git clone ssh://xxx xx
Cloning into 'xx'...
remote: Counting objects: 105491, done.
remote: Compressing objects: 100% (32876/32876), done.
Receiving objects: 100% (105491/105491), 1.74 GiB | 19.55 MiB/s, done.
remote: Total 105491 (delta 67211), reused 104583 (delta 66603)
Resolving deltas: 100% (67211/67211), done.
Checking connectivity... done.
Checking out files: 100% (16545/16545), done.
I am using windows, for my case git clone fails in Jenkins (running under system user).
Adding
Host somehost.example.org
KexAlgorithms +diffie-hellman-group1-sha1
into ~/.ssh/config will make the clone running as the current user works.
For other users, the OpenSSH won't pick up the config. I have to add the above config into the global config file: "C:\Program Files\Git\etc\ssh\ssh_config" to make it work.
This happens after I updated the git-for-windows client, new git disable some old key exchange method. Another work around is install older version of git. eg: https://github.com/git-for-windows/git/releases/tag/v2.20.1.windows.1