When I try to $ brew update
I'm getting the error:
error: Protocol https not supported or disabled in libcurl while accessing https://github.com/mxcl/homebrew/info/refs?service=git-upload-pack
However, when I $ curl --version
, I see:
curl 7.21.4 (x86_64-apple-darwin12.2.0) libcurl/7.21.4 OpenSSL/0.9.8y zlib/1.2.5 libidn/1.20
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM SSL libz
Unless I'm missing something, that looks good to me. Notice that https
is listed in the protocols list.
$ which curl
yields a suspicious response:
/usr/local/php5/bin/curl
Hmmmmm...maybe brew
is using a different curl
(like the one at /usr/bin/curl
). Let's see:
$ /usr/bin/curl --version
curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y 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
Okay, it's obviously a different install of curl
, but it's also listing https
in the protocols list, and has the OpenSSL info there too.
BTW: I get the same error if I try to use an https
URL with any git
repo on my machine.
Questions:
How can I determine the path to thecurl
thatbrew
is using?- How do I enable support for
https
inlibcurl
?
UPDATE: I was able to determine the path to libcurl.4.dylib
that git
(and brew
) are using by following deltheil's method below. The path is:
/usr/lib/libcurl.4.dylib (compatibility version 6.0.0, current version 6.1.0)
So I tried this:
$ brew install curl --with-libssh2
Luckily curl is available at a non-SSL URI, so it actually did insstall. It didn't symlink into /usr/local
, but that's fine with me (I think). So I did this:
$ cd /usr/lib
$ mv libcurl.4.dylib libcurl.4.dylib.bk
$ ln -s /usr/local/Cellar/curl/7.30.0/lib/libcurl.4.dylib libcurl.4.dylib
$ brew update
But it's still throwing me this error:
error: Protocol https not supported or disabled in libcurl while accessing https://github.com/mxcl/homebrew/info/refs?service=git-upload-pack
So now the question exclusively becomes: How do I enable support for https
in libcurl
?