I'm getting the error: Curl: 77 Error setting certificate file: http_ca.crt
when running the line: curl --cacert http_ca.crt -u elastic https://localhost:9200
Can anyone explain why I'm getting this error and more importantly how to resolve it?
I'm attempting to follow the steps in the below link: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
Edit:
The website says to use:
docker cp es01:/usr/share/elasticsearch/config/certs/http_ca.crt .
from my understanding /user/share/elasticsearch/config/certs/http_ca.crt is the source file inside the docker container, however when going into the docker container using docker exec -it es01 bash
and using the ls
command there is no 'usr' folder???? Did I miss a step? Is the tutorial wrong?
Edit 2
So I found out that docker cp es01:/usr/share/elasticsearch/config/certs/http_ca.crt .
does copy the file to my Home directory (still no clue how though since I couldn't find the 'usr' folder in the docker container).
The original error of curl 77 is still there though.
I figured out what was wrong...
I needed to give myself (root) permission to access the http_ca.crt file.