英文:
Terraform API add GPG key
问题
"我已在组织级别创建了一个API令牌,并正在尝试添加一个GPG密钥。
{
"data": {
"type": "gpg-keys",
"attributes": {
"namespace": "abc",
"ascii-armor": "-----BEGIN PGP PUBLIC KEY BLOCK----- abc -----END PGP PUBLIC KEY BLOCK-----"
}
}
}
我将命名空间提供为我从组织中获得令牌的确切组织名称(区分大小写)。
我收到了以下响应:
{
"errors": [
{
"status": "403",
"title": "forbidden",
"detail": "body namespace not authorized"
}
]
}
英文:
I've created an api token at the organization level and am trying to add a GPG key
{
"data": {
"type": "gpg-keys",
"attributes": {
"namespace": "abc",
"ascii-armor": "-----BEGIN PGP PUBLIC KEY BLOCK----- abc -----END PGP PUBLIC KEY BLOCK-----"
} }
}
I am providing namespace as the exact organization name (case sensitive) of the org I got the token from.
I am getting this response:
{
"errors": [
{
"status": "403",
"title": "forbidden",
"detail": "body namespace not authorized"
}
]
}
I am following this docs:
https://developer.hashicorp.com/terraform/cloud-docs/api-docs/private-registry/gpg-keys#add-a-gpg-key
答案1
得分: 2
你必须使用用户API令牌执行此操作。
您可以在您的用户设置页面上创建一个。
英文:
You must use a user API token to perform this operation.
You can create one on your user settings page.
答案2
得分: 0
这实际上只是用户错误(或用户不了解?)- 在Terraform云的免费版中,我们不能使用私有提供者。
更好的错误消息会使问题更容易解决。
英文:
This was actually just user error (or user unawareness?) - we cannot have private providers on the free tier of Terraform cloud.
A better error message would have made it easier.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论