谷歌函数部署错误,服务账户不存在

Zar*_*oft 12 google-cloud-functions

请您帮帮我,当我尝试部署谷歌云功能时收到此错误:

HTTP Error: 400, Default service account 'project-name@appspot.gserviceaccount.com' doesn't exist. Please recreate this account (for example by disabling and enabling the Cloud Functions API), or specify a different account.
Run Code Online (Sandbox Code Playgroud)

用于部署的命令是:

firebase deploy --only functions
Run Code Online (Sandbox Code Playgroud)

临时解决方案很好,但如果你能帮我永久解决它就更好了。

提前致谢。

Dam*_*num 5

就我而言,App Engine 默认服务帐户已被删除。它看起来像这样:{project_id}@appspot.gserviceaccount.com

所以我不得不像这样恢复服务帐户:

您现在可以从https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete恢复已删除的服务帐户

您必须从https://console.cloud.google.com/home/activity获取服务帐户的 UniqueID

来源:https : //stackoverflow.com/a/55277567/888881

API 资源管理器是使用 IAM API 的一种简单方法:https : //developers.google.com/apis-explorer/#p/


hka*_*jih 1

根据错误消息,您可以通过控制台访问此url来启用 API并启用 api。

或者通过 gcloud 命令:

gcloud services --project <project_id> enable cloudfunctions.googleapis.com
Run Code Online (Sandbox Code Playgroud)