1

I want to search for github repositories (github API v3) by curl request with https at git bash (v1.9.2 on Windows).

My test request looks like this:

$ curl -H 'Accept: application/vnd.github.v3.text-match+json' \ https://api.github.com/search/repositories?q=jquery/jquery (see API doku)

I get this response:

curl: (1) Protocol https not supported or disabeld in libcurl

Can anybody give me an advice for configuration? For addition, it'll be helpful for me to get some technical infos behind. I'm still learning.

UPDATE:

I update my Question into "How do I enable https for cURL using GIT Bash (v1.9.2) on Windows and where can I find ./configure file to add --with-ssl attribute?"

Best, Ronn

Ronny Springer
  • 189
  • 1
  • 3
  • 15
  • Damn. There is no need to configure anything. I changed my request to `$ curl https://api.github.com/search/repositories?q=jquery/jquery`. That's all. Maybe there is an issue at Git Bash passing some custom header via https. I'm not going to worry about it. – Ronny Springer May 21 '14 at 12:28
  • There is no issue at _GIT BASH_! The Backslash has the be escaped: `$ curl -H 'Accept: application/vnd.github.v3.text-match+json' \\ https://api.github.com/search/repositories?q=jquery/jquery`. – Ronny Springer May 22 '14 at 11:54

1 Answers1

2

curl: (1) Protocol https not supported or disabeld in libcurl

The error message means that curl was not built with SSL support. If you built curl from source, you'll need to rebuild it with SSL support. For curl, this is done by passing the --with-ssl flag to configure:

$ ./configure --with-ssl

Depending on your setup, you may need to take additional steps. The curl install docs do a decent job of explaining the steps: http://curl.haxx.se/docs/install.html

John Szakmeister
  • 38,342
  • 9
  • 78
  • 72
  • Year, thank you for your answer. But I can't find `./configure` file at my git installation (`C:\Program Files (x86)\Git\bin` or `.\ssl`). I'm using the git bash and curl is basically working. I ask myself why should I [install cURL as this thema is discussed](http://stackoverflow.com/a/9507379/2199721) separatly? – Ronny Springer May 21 '14 at 11:24
  • @RonnySpringer Oi, you're using Windows. I assume you're using msysGit? Unfortunately, I don't use Windows on a daily basis and almost never for development these days. I would have though the msysGit guys would have SSL support though--I have at least cloned from a GitHub URL before under Windows with it. Which curl is being used? How did you get curl? Are you sure it's the one that came with msysGit? I do think the other answer could definitely be useful for you in this situation. – John Szakmeister May 21 '14 at 13:00