當我嘗試在 GCP App Engine 上構建我的應用程式時出現以下錯誤,我的應用程式環境非常靈活。但我不知道我的 App Engine 環境是否靈活。
如果是這種情況,我如何在 GCP App Engine 中將我的環境設定為靈活?
ERROR: (gcloud.app.deploy) Error Response: [7] The App Engine appspot and App Engine
flexible environment service accounts must have permissions on the image
[eu.gcr.io/["key file"]/appengine/default.20220514t124713:latest]. Please check
that the App Engine default service account has the [Storage Object Viewer] role and the
App Engine Flexible service account has the App Engine Flexible Environment Service
Agent role
我正在使用正確的 .travis 格式在 Travis CI 上構建,我收到此錯誤。我也嘗試直接在 GCP 的 Cloud Shell 終端上構建它,但我有同樣的錯誤。
這是我的 app.yaml 檔案:
env: flex
runtime: custom
service: default
manual_scaling:
instances: 1
resources:
cpu: 1
這是我在 IAM 權限中所擁有的:

uj5u.com熱心網友回復:
@DazWilkin 解決了它。為了解決這個問題,我需要向 IAM 添加 ( {project-id}@appspot.gserviceaccount.com) 以正確構建專案。
“您可以確定它的電子郵件地址 ({project-id}@appspot.gserviceaccount.com),并且您應該能夠簡單地將其重新添加到 IAM 策略中......給它角色/編輯器。它是 Google 管理的 (擁有)服務帳戶,因此您不能洗掉服務帳戶本身,只能洗掉角色系結。” - @DazWilkin
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/476237.html
上一篇:解決Ubuntu報錯 E: Unable to locate package yum
下一篇:Laravel8-Illuminate\Auth\EloquentUserProvider::validateCredentials()
