gpt4 book ai didi

proxy - 如何在代理后面设置地形?

转载 作者:行者123 更新时间:2023-12-04 08:11:22 35 4
gpt4 key购买 nike

我正在尝试在 Windows 上的代理后面运行 terraform。我已经通过执行以下操作在 CMD 上设置了我的代理:设置 HTTP_PROXY 并设置 HTTPS_PROXY。

这是我遇到的错误:

Initializing provider plugins...
- Finding latest version of hashicorp/aws...

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider hashicorp/aws:
could not connect to registry.terraform.io: Failed to request discovery
document: Get "https://registry.terraform.io/.well-known/terraform.json":
proxyconnect tcp: tls: first record does not look like a TLS handshake

我的基础架构没有问题,因为我已经在另一台没有代理的计算机上尝试过它并且可以正常工作。

提前谢谢你。

最佳答案

我正在使用带密码的 terraform 代理,通过设置如下环境变量:

HTTP_PROXY=http://<username>:<password>@<proxy>:<port>
HTTPS_PROXY=http://<username>:<password>@<proxy>:<port>

HTTPS_PROXY 设置为 http url not https

关于proxy - 如何在代理后面设置地形?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65939427/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com