【发布时间】:2020-08-11 00:14:00
【问题描述】:
我通过 ssh 登录到计算引擎。我正在使用我的个人 ssh 密钥进行 ssh 登录。即。我做了gcloud compute ssh --project someproj --zone somezone someserver 登录。然后我尝试做gcloud compute instances list查看外部ip。它说我没有足够的权限。我的理解是,虽然我自己有 ssh 登录,但实际上我使用的是服务帐户。所以我将服务帐户编辑为Role: Compute Viewer,但仍然出现错误。我做错了什么?
请注意我知道我可以使用 cli 从控制台或通过我的电脑查看外部 IP。我更感兴趣的是为什么计算实例在 IAM 设置下看不到它。
这是实际的错误:
$ gcloud compute instances list
ERROR: (gcloud.compute.instances.list) Some requests did not succeed:
- Insufficient Permission: Request had insufficient authentication scopes.
这是我的 gcloud sdk 配置:
$ gcloud config list
[core]
account = some-service-account@developer.gserviceaccount.com
disable_usage_reporting = True
project = some-project
Your active configuration is: [default]
【问题讨论】:
标签: google-cloud-platform google-compute-engine