Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curl is unable to access github.com due to "unknown message digest algorithm"

I've been trying to install RVM all day and I've been hung up this entire time by curl, which refuses to connect to https://github.com.

Here is my current error: curl: (35) error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm

Here is the log output when I use the verbose flag:

* About to connect() to github.com port 443 (#0)
*   Trying 192.30.252.130...
* Adding handle: conn: 0x100805400
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x100805400) send_pipe: 1, recv_pipe: 0
* Connected to github.com (192.30.252.130) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /System/Library/OpenSSL/certs/cacert.pem
    CApath: none
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS alert, Server hello (2):
* error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm
* Closing connection 0

I'm on a 2011 MacBook Pro running Mavericks (10.9.2). Brew says that my curl and my openssl are up to-date.

Originally, curl was telling me that github didn't have the proper SSL certificate, but I managed to finally get around that with this command: export CURL_CA_BUNDLE="/System/Library/OpenSSL/certs/cacert.pem"

Any help would be greatly appreciated!

like image 707
BenWurth Avatar asked Apr 25 '14 01:04

BenWurth


2 Answers

I had the same error; I tried the "-k" option and it worked.

like image 98
John Doe Avatar answered Nov 27 '22 12:11

John Doe


I figured it out. Turns out, my environment wasn't using the system curl, it was using Anaconda's version of curl, which was outdated and not linked to OSX's keychain. I simply used conda remove curl to get rid of it and everything seems to be working fine now.

like image 34
BenWurth Avatar answered Nov 27 '22 12:11

BenWurth