I recently upgraded to OS X Mountain Lion, and when I run curl-config --ca
I get an empty line. Details about curl:
curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz
The issue is that I can't run brew update
unless I update the certificate because I get the following error:
Initialized empty Git repository in /usr/local/.git/
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/mxcl/homebrew.git/info/refs
fatal: HTTP request failed
Error: Failure while executing: git fetch origin
The homebrew help forums say I need to update the certificate. However, unless I can find where curl is storing the certificate, I can't update it.
EDIT: The solution presented by HeatfanJohn below:
I just noticed that there is a Macport for curl-ca-bundle. Sorry for the possibly simple question, but did you install curl or did it come preinstalled? You might want to consider installing MacPorts and then installing curl-ca-bundle using MacPorts, although looking quickly at the Portfile this MacPort appears to just put the bundle into /usr/share which you can also do manually.
The command to install from MacPorts is port install curl
. Installing from MacPorts resolves the issue.
Best Answer
I mostly run
curl
on Winodws, but from the curl documentation the following should work:Then download the lastest
.pem
file from http://curl.haxx.se/ca/cacert.pem placing the.pem
in the directory path that you specify in theCURL_CA_BUNDLE
environment variable. The documentation is a little vague as to whether the environment variable points to the file or directory. I would try pointing it to the file.On Windows,
curl
looks for the.pem
file as filecurl-ca-bundle.crt
in the same directory where thecurl
executable lives. That may also work. I have an old MAC at home. I will test this later tonight.curl-config --ca
returns/usr/share/curl/curl-ca-bundle.crt
for me.I just noticed that there is a Macport for curl-ca-bundle. Sorry for the possibly simple question, but did you install curl or did it come preinstalled? You might want to consider installing MacPorts and then installing curl-ca-bundle using MacPorts, although looking quickly at the Portfile this MacPort appears to just put the bundle into /usr/share which you can also do manually.
I installed
curl
from Macports and now I have version 7.27.0 installed and it is configured to use the latest curl-ca-bundle.crt file. See below: