无法阻止冒充 GCP 服务帐号

问题描述 投票:0回答:1

几周前,我开始使用 gcloud auth activate-service-account 命令模拟 ServiceAccount。现在我无法返回到我的普通用户帐户,并且我运行的每个命令都使用模拟,甚至 gcloud config set project ... 抛出:

WARNING: This command is using service account impersonation.

我尝试了 gcloud auth login、gcloud init 等...从我的 Linux 主目录的 .config/gcloud 中删除了credentials.db 文件。这些文档没有关于如何阻止冒充的主题。

有人知道停止冒充的正确命令吗?

google-cloud-platform gcloud service-accounts impersonation
1个回答
0
投票

对我有用的修复

这可能不是生产就绪的解决方案,或者有更好的选择,IDK。

  1. 首先尝试
    gcloud auth application-default login
    并按照说明进行操作(浏览器将打开)-可能会有所帮助

如果上述对您没有帮助,我在重新运行上面的命令之前执行了额外的步骤:

  1. 我已从配置文件夹中删除了应用程序默认凭据: `rm ~/.config/gcloud/application_default_credentials.json
  2. 再次运行:
    gcloud auth application-default login
© www.soinside.com 2019 - 2024. All rights reserved.