2015-11-07 71 views
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实例具有对存储的访问权限,如下图所示,所以我不明白为什么会弹出此错误消息。

Permissions seem correct?!

+0

存储桶的权限是否有可能不允许从Jenkins实例访问?您可以尝试在云控制台中创建一个[服务帐户](https://developers.google.com/identity/protocols/OAuth2ServiceAccount),并让Jenkins使用它。 –

+0

我已经通过Jenkins实例中的服务帐户工作。 – ThijsM

+0

您显示的屏幕截图是[Compute Engine服务帐户](https://cloud.google.com/compute/docs/authentication),与[开发人员服务帐户](https://developers.google)不同的.com /同一性/协议/ OAuth2ServiceAccount)。你在用哪个? –

回答

1

转至App Engine的开发者控制台https://appengine.google.com/和 应用程序设置>云集成>并接通谷歌云存储

所以这将设置默认的桶你。这是Google新开发者控制台自动执行的操作。如果项目是在旧控制台上创建的,则必须手动完成。

相关问题