首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用ddev环境中主机的证书连接远程系统

使用ddev环境中主机的证书连接远程系统
EN

Stack Overflow用户
提问于 2020-04-09 19:08:42
回答 2查看 95关注 0票数 1

我尝试连接一个可从主机(Windows10Enterprise)系统访问的远程弹性集群。

我通过curl https://url.to.target:443测试了主机的连接。得到了‘确定,它的搜索’-响应。

当我在webserver-container (Debian GNU/Linux 10 (buster))中尝试相同的方法时,它失败了,原因是:

代码语言:javascript
运行
复制
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. 

有没有使用主机证书存储的简单方法?

EN

Stack Overflow用户

发布于 2021-07-20 21:36:40

  • 将yourcert.crt复制到.ddev/web-build文件夹。
  • 创建自定义.ddev/web-build/folder文件,例如:
代码语言:javascript
运行
复制
    ARG BASE_IMAGE
    FROM $BASE_IMAGE
    COPY ./yourcert.crt /usr/local/share/ca-certificates/
    RUN update-ca-certificates --fresh

  • 在代码中引用证书时,请使用:

$myCert='/usr/local/share/ca-certificates/yourcert.crt';

票数 1
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61119773

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档