# Can't run curl in terminal

**URL:** <https://discuss.elastic.co/t/cant-run-curl-in-terminal/312469>\
**Category:** Elasticsearch\
**Created:** [August 19, 2022, 12:43pm UTC](https://discuss.elastic.co/t/cant-run-curl-in-terminal/312469 "2022-08-19T12:43:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarindra\_Therese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarindra_therese/32/103180_2.png) [@Sarindra\_Therese](https://discuss.elastic.co/u/Sarindra_Therese)\
**Post date:** [August 19, 2022, 12:43pm UTC](https://discuss.elastic.co/t/cant-run-curl-in-terminal/312469/1 "2022-08-19T12:43:56Z")

</div>

Hi Everyone,  
I don't know what's happen, but i can't run curl cmd in terminal,  
I've already ran curl -GET [https://127.0.0.1:9200](https://127.0.0.1:9200)  
and the response is:

> curl: (58) could not load PEM client certificate, OpenSSL error error:02001002:system library:fopen:No such file or directory, (no key found, wrong pass phrase, or wrong file format?)

when i run curl -X GET '[https://localhost:9200/\_cat/indices?v](https://localhost:9200/_cat/indices?v)'

> curl: (60) SSL certificate problem: self signed certificate in certificate chain  
> More details here: [curl - SSL CA Certificates](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. To learn more about this situation and  
> how to fix it, please visit the web page mentioned above.

I also try this:  
` curl --cacert /etc/elasticsearch/config/certs/http_ca.crt -u elastic https://127.0.0.1:9200`

but:

> curl: (77) error setting certificate verify locations:  
> CAfile: /etc/elasticsearch/config/certs/http\_ca.crt  
> CApath: /etc/ssl/certs

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 16, 2022, 12:44pm UTC](https://discuss.elastic.co/t/cant-run-curl-in-terminal/312469/2 "2022-09-16T12:44:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
