linux - gcloud 始终使用默认凭据

标签 linux ubuntu gcloud

我在使用 gcloud 凭据时遇到了问题。它始终使用默认用户凭据,即使我使用 gcloud auth activate-service-account --key-file=[PATH] 添加新凭据也是如此。当我使用 gcloud auth list 列出我的凭据时,我可以看到我之前添加的事件凭据。

我做错了什么? gcloud 在 Linux(我的操作系统)上有什么问题吗?

最佳答案

当您列出使用 gcloud auth list 配置的帐户时,您应该会看到添加的服务帐户。如果它未设置为事件(带 * ),则您可以使用 gcloud config set account YOUR_SERV_ACC 选择它。 Linux 上的 gcloud 没有问题,您可能还需要 revoke先前生成 Application Default Credentials : gcloud auth application-default revoke.

关于linux - gcloud 始终使用默认凭据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50809588/

相关文章:

arrays - 从 cURL 结果访问项目列表

apache - 在 Cloud Foundry 中,如何创建服务来运行我的 Apache Web 服务器?

google-app-engine - 使用 'Project not found' 时收到 `gcloud deploy app` 错误

linux - ./freezemethod : line 2: syntax error near unexpected token `|'

c - linux中如何获取指定线程的注册信息?

linux - 我应该如何应用这种类型的补丁?

performance - MongoDb 的分片不会改进实验室设置中的应用程序

php - PHP中使用IMAP()获取近期未读邮件数

google-cloud-platform - 创建 Google Cloud 服务帐号时,是否需要在创建 key 后对其进行授权?

api - 谷歌云平台 : List available projects using api