How to enable https support in libcurl?

When I try $ brew update , I get an error message:

 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 

If I am missing something, it looks good to me. Please note that https is listed in the protocol list.

$ which curl gives a suspicious answer:

 /usr/local/php5/bin/curl 

Hmmmmm ... maybe brew uses a different curl (like the one for /usr/bin/curl , for example). 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 

Well, this is obviously another curl installation, but it also lists https in the protocol list and also contains OpenSSL information.

BTW: I get the same error if I try to use the https URL with any repo on git on my machine.

Questions:

  • How to determine the path to curl that brew uses?
  • How to enable https support in libcurl ?

UPDATE:. I was able to determine the path to libcurl.4.dylib that git (and brew ) uses, following the deltheil method below. Way:

 /usr/lib/libcurl.4.dylib (compatibility version 6.0.0, current version 6.1.0) 

So, I tried this:

 $ brew install curl --with-libssh2 

Fortunately, curl is available on a URI without SSL, so it really did. It did not symbolically refer to /usr/local , but it is 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 he still throws 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 to enable https support in libcurl ?

+12
git homebrew libcurl
Sep 25 '13 at 21:11
source share
3 answers

How to determine the path to curl that brew uses?

Homebrew uses /usr/bin/curl , that is, the version that ships with Mac OS X, as you can see here .

Given that your problem is probably related to the gcur version of libcurl used for http:// and https:// .

Run which git to determine which version is used (mine is installed under /usr/local ).

Then scan the shared libraries as follows:

 $ otool -L /usr/local/git/libexec/git-core/git-http-push | grep curl /usr/lib/libcurl.4.dylib 

Replace /usr/local/ installation directory that matches your git .

Since the version of libcurl used by your git exec does not support HTTPS, this will tell you what version it is and where it is installed.

+4
Sep 27 '13 at 8:18
source
— -

This worked for me:

Reinstall the curl and set it using the following commands (after unpacking):

 $ ./configure --with-darwinssl $ make $ make test $ sudo make install 

When you run the command "curl -version", you will notice that the https protocol is now present in the "protocols".

Useful site for links when you encounter curl problems: https://curl.haxx.se/docs/install.html

+1
Jul 20 '17 at 20:36
source

I had this problem on OSX. The problem was duplicating the curl and curl.config files inside usr / local / bin, which contradicted the same two files in usr / bin. I deleted the first set in local / bin, and after that Terminal worked.

0
Jun 15 '16 at 5:21
source



All Articles