gcloud - 沉默 `gcloud auth activate-service-account`

标签 gcloud gcloud-cli

我在脚本中使用 gcloud auth activate-service-account 来激活服务帐户。它输出

Activated service account credentials for: [XXX@YYY.iam.gserviceaccount.com]

有没有标志我可以用来让命令不输出任何东西? --quiet 似乎没有按照我的意愿行事。

最佳答案

看起来您需要使用 --no-user-output-enabled 标志。

gcloud --no-user-output-enabled auth activate-service-account --key-file=[service-account.json]

官方文档here :

--user-output-enabled

Print user intended output to the console. Overrides the default core/user_output_enabled property value for this command invocation. Use --no-user-output-enabled to disable.

关于gcloud - 沉默 `gcloud auth activate-service-account`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50176330/

相关文章:

java - Google Cloud 资源管理 Java Api 项目列表

google-cloud-storage - 如何从 gcloud 中的部署中排除文件?

android - 通过 Jenkins 将参数传递给 gcloud 应用程序

google-cloud-platform - 通过服务帐户使用 Google Cloud Source Repositories

gcloud - 如何使用工作流程在 CircleCI 作业之间保留数据?特别是 gcloud-cli 使用 orbs

docker-registry - 检索在 Container Engine Registry 中注册的所有容器镜像的列表

docker - 仅 "logs"和 "json-file"日志记录驱动程序支持 "journald"命令(获取 : gcplogs)

gcloud - 在 Google Compute Cloud VM 实例上设置 Coturn Server 时出错

google-cloud-platform - 如何在 GCP 中使用 gcloud cli 重命名现有的 'named configurations'?

google-compute-engine - 如何检查 Google VM 实例是否已经具有 gcloud 的凭据