【问题标题】:Terraform failed API authorizationTerraform API 授权失败
【发布时间】:2022-06-15 23:34:16
【问题描述】:

按照本教程:https://learn.hashicorp.com/tutorials/terraform/cloud-sign-up?in=terraform/cloud-get-started#create-an-organization 我被定向到此:https://app.terraform.io/app/getting-started/example,我无法在第一步中成功-

地形登录

我从打开的网站复制并粘贴了令牌,结果如下: │ Error: Failed to create API client: Get "https://app.terraform.io/api/v2/ping": net/http: invalid header field value "Bearer \x16" for key Authorization

error message 我知道看起来我提供了错误的令牌/一些错字,但我尝试了几次,所以我不知道我怎么每次都错误地复制和粘贴了令牌

我非常认真地学习了 Hashicorp 以前的教程

【问题讨论】:

    标签: terraform-provider-aws terraform0.12+


    【解决方案1】:

    更新版本的 terraform 有帮助。我用 Chocolatey 下载了 terraform,它下载了过时的版本。

    【讨论】:

    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
    【解决方案2】:

    我遇到了同样的错误,并通过切换我正在使用的终端应用程序解决了它。显然,当您粘贴到 Windows 上的 VS Code 中的终端时,它会附加一个额外的 unicode 字符。在 Windows Powershell 中粘贴令牌效果很好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-05
      • 2021-08-08
      • 1970-01-01
      相关资源
      最近更新 更多