【问题标题】:Insufficient authentication scopes from Jenkins build via Google Compute EngineJenkins 通过 Google Compute Engine 构建的身份验证范围不足
【发布时间】: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


【解决方案1】:

转到 App Engine 开发者控制台https://appengine.google.com/ 并在 应用程序设置 > 云集成 > 并打开谷歌云存储

所以这将为您设置默认存储桶。这是新的 Google Developer Console 会自动执行的操作。如果项目是在旧控制台上创建的,您必须手动执行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-11-11
    • 1970-01-01
    • 2021-11-22
    • 1970-01-01
    • 2016-04-28
    • 2021-12-01
    • 2017-08-09
    • 1970-01-01
    相关资源
    最近更新 更多