简体   繁体   English

Curl 77 设置证书文件时出错:http_ca.crt

[英]Curl 77 Error setting certificate file: http_ca.crt

I'm getting the error: Curl: 77 Error setting certificate file: http_ca.crt我收到错误消息: Curl: 77 Error setting certificate file: http_ca.crt

when running the line: curl --cacert http_ca.crt -u elastic https://localhost:9200运行线路时: 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我正在尝试按照以下链接中的步骤操作: 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????据我了解 /user/share/elasticsearch/config/certs/http_ca.crt 是 docker 容器内的源文件,但是当使用docker exec -it es01 bash并使用ls命令进入 docker 容器时,没有 'usr ' 文件夹???? Did I miss a step?我错过了一步吗? Is the tutorial wrong?教程错了吗?

在此处输入图像描述

Edit 2编辑 2

So I found out that docker cp es01:/usr/share/elasticsearch/config/certs/http_ca.crt .所以我发现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).确实将文件复制到我的主目录(仍然不知道如何,因为我在 docker 容器中找不到“usr”文件夹)。 The original error of curl 77 is still there though. curl 77 的原始错误仍然存​​在。

I figured out what was wrong...我发现出了什么问题...

I needed to give myself (root) permission to access the http_ca.crt file.我需要授予自己(root)访问 http_ca.crt 文件的权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 卷曲错误“没有替代证书。” - Curl error “no alternative certificate..” Ubuntu 上 CosmosDB 的 CRT 证书不起作用 - CRT certificate for CosmosDB on Ubuntu not working 从 cacerts 文件中删除别名 [可信证书颁发机构 (CA) 证书的集合] - jdk 11 - Remove alias from cacerts file [collection of trusted certificate authority (CA) certificates] - jdk 11 g77编译错误(找不到crt1.o,crti.o,-lgcc_s) - g77 compiling errors (cannot find crt1.o, crti.o, -lgcc_s) crt1.o linux x64上没有这样的文件c ++编译错误 - crt1.o no such file c++ compilation error on linux x64 Linux Git:无法访问远程:错误设置证书验证位置 - Linux Git: Unable to access remote: error setting certificate verify locations 致命错误:curl / curl.h:没有这样的文件或目录 - fatal error: curl/curl.h: No such file or directory 如何修复导入证书文件中的“证书导入错误:此客户端证书的私钥丢失或无效”错误 - How to fix ‘Certificate Import Error: The Private Key for this Client Certificate is missing or invalid' error in the import certificate file curl 响应说“不支持 HTTP 版本”,错误 505 - curl response says “HTTP version not supported”, error 505 为什么curl在R返回HTTP错误407? - Why does curl return HTTP error 407 in R?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM