Cannot communicate securely with peer: no common encryption algorithm(s)

hithard picture hithard · May 7, 2015 · Viewed 7.7k times · Source

I am a fedora 20 user. While cloning a repository,I got the following error: " Cloning into 'git_missions'... fatal: unable to access 'https://openhatch.org/git-mission-data/git/hithard/': Cannot communicate securely with peer: no common encryption algorithm(s). "

I am not getting what to do?need help.

Answer

larsks picture larsks · May 7, 2015

The simplest solution is just to use http instead of https:

$ git clone http://openhatch.org/git-mission-data/git/hithard/
Cloning into 'hithard'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.

I think the error itself ("no common encryption algorithms") is accurate; it appears that the server wants to use some sort of elliptic curve cipher (TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256) that is not supported by git's underlying SSL library. You can use something like wireshark to capture the SSL handshake between git and the server and see the options being passed back and forth.

At least on my system, curl does not seem to support this cipher, and git uses libcurl for handling https/http connections.

Update

So, based on my last comment to @mattdm, in which I discovered that curl on my system is using the NSS crypto library, the following works:

curl --ciphers ecdhe_ecdsa_aes_128_gcm_sha_256 https://openhatch.org/

Unfortunately, there isn't any way to pass a cipher list to git. The patch to make it do so is trivial -- here is one version I just made -- but I don't know what the odds are of getting this accepted upstream.