1
我在网上搜索了一段时间,但似乎无法找到正确的答案。通过Google Compute Engine从Jenkins构建的认证范围不足
我在Google Compute Engine上创建了一个虚拟机实例,并且正在运行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实例访问?您可以尝试在云控制台中创建一个[服务帐户](https://developers.google.com/identity/protocols/OAuth2ServiceAccount),并让Jenkins使用它。 –
我已经通过Jenkins实例中的服务帐户工作。 – ThijsM
您显示的屏幕截图是[Compute Engine服务帐户](https://cloud.google.com/compute/docs/authentication),与[开发人员服务帐户](https://developers.google)不同的.com /同一性/协议/ OAuth2ServiceAccount)。你在用哪个? –