卓越飞翔博客卓越飞翔博客

卓越飞翔 - 您值得收藏的技术分享站
技术文章33911本站已运行390

Okteto CLI:信任自定义 CA 证书

okteto cli:信任自定义 ca 证书

问题内容

在查看《使用 php 开始使用 okteto 云》教程时,在运行 okteto init 时出现“证书由未知机构签名”错误。我相信这与我们公司定义的自定义 zscaler ca 有关。

如何让 okteto cli 信任自定义 ca?据我了解,它是用 golang 开发的,但是使用证书的位置设置 ssl_cert_file 和 ssl_cert_dir 没有帮助。

➜ php-getting-started git:(main) okteto init
i Using … @ cloud.okteto.com as context
✓ Okteto manifest (okteto.yml) deploy and build configured successfully
? Do you want to launch your development environment? [Y/n]: y
i Building ‘Dockerfile’ in tcp://buildkit.cloud.okteto.net:443…
[+] Building 0.0s (0/0)
x Error building service ‘hello-world’: error building image ‘registry.cloud.okteto.net/.../php-hello-world:1.0.0’: build failed: failed to dial gRPC: rpc error: code = Unavailable desc = connection error: desc = “transport: authentication handshake failed: x509: certificate signed by unknown authority”


正确答案


最新版本 (2.15.3) 不支持此功能,但计划在下一个版本中发布。

该修复已合并,并可在开发频道上使用:

export OKTETO_CHANNEL=dev
curl https://get.okteto.com -sSfL | sh

https://community.okteto.com /t/allowing-custom-certificates-in-okteto-cli/828 有关于此的更多信息。

卓越飞翔博客
上一篇: Go Doc 意外地缩进/分组函数。是什么原因造成的?
下一篇: 返回列表
留言与评论(共有 0 条评论)
   
验证码:
隐藏边栏