【发布时间】:2015-11-24 02:08:14
【问题描述】:
我在网上搜索了一段时间,但似乎找不到正确的答案。
我在 Google Compute Engine 上创建了一个 VM 实例,并在其上运行 Jenkins。此实例检查我拥有的代码存储库,当发生更改时,我想运行以下命令
gcloud --project=test preview app deploy -q app.yaml --version=dev
当我想触发构建,或者它自己触发它时,我收到以下错误:
Beginning deployment...
ERROR: Error Response: [403] Request had insufficient authentication scopes.
ERROR: (gcloud.preview.app.deploy) Could not retrieve the default Google Cloud Storage bucket for [test].
Please try again or use the [bucket] argument.
如下图所示,VM 实例确实可以访问存储,所以我不明白为什么会弹出此错误。
【问题讨论】:
-
存储桶的权限是否有可能不允许来自 Jenkins 实例的访问?您可以尝试通过在 Cloud Console 中创建 service account 并让 Jenkins 使用它来解决问题。
-
我已经通过 Jenkins 实例中的服务帐户工作。
-
您显示的屏幕截图适用于Compute Engine service account,与developer service account 不同。你用的是哪个?
-
你能解决这个问题吗?我也面临同样的问题。
-
解决方案发布在this thread。
标签: google-app-engine jenkins gcloud