登录
首页 >  Golang >  Go问答

Okteto CLI:允许使用自定义 CA 证书

来源:stackoverflow

时间:2024-02-24 18:54:27 112浏览 收藏

在IT行业这个发展更新速度很快的行业,只有不停止的学习,才不会被行业所淘汰。如果你是Golang学习者,那么本文《Okteto CLI:允许使用自定义 CA 证书》就很适合你!本篇内容主要包括##content_title##,希望对大家的知识积累有所帮助,助力实战开发!

问题内容

在查看《使用 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 有关于此的更多信息。

今天关于《Okteto CLI:允许使用自定义 CA 证书》的内容就介绍到这里了,是不是学起来一目了然!想要了解更多关于的内容请关注golang学习网公众号!

声明:本文转载于:stackoverflow 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>