Car*_*nez 8 google-cloud-platform google-cloud-run
尝试将映像部署到云运行时出现权限错误:
gcloud beta run deploy endpoints_proxy \
--image="gcr.io/endpoints-release/endpoints-runtime-serverless:1.30.0" \
--allow-unauthenticated
Run Code Online (Sandbox Code Playgroud)
这是错误:
ERROR: (gcloud.beta.run.deploy) User [email-goes-here] does not have permission to access namespace [project-id-goes-here] (or it may not exist): Cloud Run does not have permission to get access tokens for the default compute service account, 1088973916567-compute@developer.gserviceaccount.com. Please give Google Cloud Run Service Agent the permission iam.serviceAccounts.getAccessToken on the default compute service account.
Run Code Online (Sandbox Code Playgroud)
我的帐户具有所有者和编辑器权限,我什至尝试附加 Cloud Run Service Agent 角色。
我还尝试将这些角色添加到错误中列出的“默认计算服务帐户”中,但没有奏效。
Car*_*nez 16
错误消息非常具有误导性,发生错误是因为缺少Cloud Run Service Agent。
创建以下服务帐户后:
Name: service-<account-id>@serverless-robot-prod.iam.gserviceaccount.com
Role: Google Cloud Run Service Agent
Run Code Online (Sandbox Code Playgroud)
问题就解决了。看起来 Cloud Run 需要此服务帐户才能工作,所以永远不要删除它 :)
小智 13
您应该启用Cloud Build 服务帐户的权限。除非你这样做,否则它不会起作用。
Google Cloud Console > Cloud Build > Cloud Build Settings > 启用对您正在使用的 GCP 服务的访问。(参见附图)
| 归档时间: |
|
| 查看次数: |
4793 次 |
| 最近记录: |