我想搜索github存储库(github API v3)通过curl请求与https在git bash (v1.9.2在Windows上)。
我的测试请求看起来像这样:
$ curl -H 'Accept: application/vnd.github.v3.text-match+json' https://api.github.com/search/repositories?q=jquery/jquery
(见API doku)
我得到这样的响应:
curl: (1) Protocol https not supported or disabeld in libcurl
:
我更新我的问题为"我如何启用https cURL使用GIT Bash (v1.9.2)在Windows上,我在哪里可以找到./configure
文件添加--with-ssl
属性?"
最好的,Ronn
curl: (1) Protocol https not supported or disabeld in libcurl
错误信息意味着curl没有使用SSL支持构建。如果从源代码构建curl,则需要使用SSL支持重新构建它。对于curl,这是通过将--with-ssl
标志传递给configure
来完成的:
$ ./configure --with-ssl
根据您的设置,您可能需要采取额外的步骤。curl安装文档很好地解释了这些步骤:http://curl.haxx.se/docs/install.html