api - 从 sumo 逻辑下载数据时 curl 失败

标签 api ssl curl download sumologic

我正在尝试使用 api 下载数据。我的代码是:

curl -u "accessID***:accessKey***" -X GET https://api.au.sumologic.com/api/v1/collectors?limit=2   (just follow the example from https://help.sumologic.com/APIs/Search-Job-API/About-the-Search-Job-API). But I have got the error:

Curl:(60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. ...

图片:

enter image description here

我试图从 https://curl.haxx.se/docs/sslcerts.html 中读取信息.但这是我第一次使用 api 和 curl。我真的不明白如何解决这个问题。

我在 Windows 服务器上运行此代码。我从 https://curl.haxx.se/download.html 下载 curl .版本是

Windows 64 bit 7.61.1 binary the curl project.

最佳答案

使用 http://curl.haxx.se/docs/sslcerts.html 而不是 https://curl.haxx.se/docs/sslcerts.html 你将避免 SSL 要求。

关于api - 从 sumo 逻辑下载数据时 curl 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52810380/

相关文章:

c# - UPS API .Net 添加 Web 引用

ssl - 通过 https(ssl) 将多个域指向同一个 IP/主域

c# - WCF:缓存 SSL 数据

PHP 远程文件最后修改时间

PHP - 使用 cURL 访问 HTTPS (SSL) 保护的站点

php - 使用 cURL 传输图像

javascript - 如何在客户端 Javascript 中隐藏 API key

c++ - 如何从 C++ 调用 GDAL Hillshade

api - golang 反模式中的基本 API?

javax.net.ssl.SSLException : SSLSocketFactory is null 异常