我在脚本中使用 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/