Home >Backend Development >Golang >Okteto CLI: Trust custom CA certificate

Okteto CLI: Trust custom CA certificate

WBOY
WBOYforward
2024-02-05 22:24:071244browse

Okteto CLI:信任自定义 CA 证书

Problem content

When viewing the tutorial "Using php to start using okteto cloud", "certificate" appears when running okteto init Signed by unknown authority" error. I believe this has to do with the custom zscaler ca defined by our company.

How to make okteto cli trust custom ca? As far as I understand it is developed in golang, but setting ssl_cert_file and ssl_cert_dir with the location of the certificate doesn't help.

➜ 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”

Correct answer


This feature is not supported in the latest version (2.15.3), but is planned for release in the next version.

The fix has been merged and is available on the development channel:

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

https://community.okteto.com /t/allowing-custom-certificates-in-okteto-cli/828 More information about this.

The above is the detailed content of Okteto CLI: Trust custom CA certificate. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete