我尝试连接主机(Windows 10 Enterprise)系统可用的远程弹性集群。
我通过curl https://url.to.target:443测试了主机的连接。得到了“当然,它的搜索”的回应。
当我在网络服务器容器(Debian GNU/Linux 10(buster))内部尝试相同的操作时,它失败了:
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.
有没有一种简单的方法使用主机证书存储?
ARG BASE_IMAGE
FROM $BASE_IMAGE
COPY ./yourcert.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates --fresh
!!!这只是一个快速而肮脏的不安全的解决方法!!!
!!!仅在没有其他问题的情况下用于测试!!!
!!!确保您的证书修复后立即将其禁用!!!
您是否尝试过将不安全选项添加到主目录中的 .curlc 文件中?
echo insecure >> $HOME/.curlrc
不应在生产中使用!