VM实例服务帐户可以识别

发布于 2025-01-18 12:17:58 字数 263 浏览 1 评论 0原文

尽管我扮演了该特定服务的所有者角色,但我无法从本地与SSH联系的实例中使用权限。

也无法将我的文件上传到我在云平台中创建的存储存储桶。

这是问题的屏幕截图:

​i.sstatic.net/jbazo.png“ alt =“ cloud Iam page”>

Although I've gave Owner role to that specific service, I can't use the permissions from my instances that I connect with SSH from my local.

Also can't upload my files to Storage bucket which I've created in cloud platform.

Here is the screenshots of the problem:

Error in console

Cloud IAM Page

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

偷得浮生 2025-01-25 12:17:58

该问题可能是由于访问令牌不具有执行所需活动的适当权限范围而引起的。为了确保您正确使用此服务帐户的身份验证范围,我建议执行以下操作:

  1. Google 文档 在虚拟机内
    为服务帐户创建一个新密钥。这将创建一个 .json
    当前目录中包含私有文件
    服务帐户的身份验证密钥。
  2. 运行 Google 文档中的命令来激活
    服务帐户。
  3. 运行命令:$gcloud auth list 检查这是否有效。
    在输出中,您应该在服务之前看到一个星号
    帐户名称,表明这是您所在的服务帐户
    目前正在使用。
  4. 现在请参阅 Google 文档并运行 $env:GOOGLE_APPLICATION_CREDENTIALS =“KEY_PATH”

The problem might be caused by the access token not having the appropriate permission scopes to conduct the required activity. To make sure you're using the auth scope of this service account appropriately, I recommend doing the following:

  1. Run the command in the Google documentation inside the VM to
    create a new key for the service account. This will create a .json
    file inside the current directory containing the private
    authentication key for the service account.
  2. Run the command in the Google documentation to activate the
    service account.
  3. Run the command: $gcloud auth list to check if this worked.
    In the output you should see an asterisk before the service
    account’s name, indicating that this is the service account you are
    currently using.
  4. Now refer to the Google documentation and run the $env:GOOGLE_APPLICATION_CREDENTIALS="KEY_PATH"
不甘平庸 2025-01-25 12:17:58

Google 云计算虚拟机具有访问范围设置。此功能可以限制服务帐户附加到虚拟机时拥有的权限。

转到 Google Cloud Console GUI,选择您的虚拟机,停止虚拟机,然后编辑访问范围以授予您所需的权限。

访问范围

Google Cloud Compute VMs have a setting for Access Scopes. This feature can limit the permissions that a service account has when attached to a virtual machine.

Go to the Google Cloud Console GUI, select your VM, stop the VM and then edit Acess Scopes to grant the permissions you require.

Access scopes

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文