3

我正在按照谷歌教程创建一个简单的 helloWorld 函数并将其部署在谷歌云上。我的机器是 Windows 7 - 64 位。我正在关注此链接:https ://cloud.google.com/functions/docs/tutorials/http

However I am facing few issues here:
1. Before You Begin -> Enable the API: getting the following error: "You have no permissions to use requested API"

2. Install the Cloud SDK: When I run the downloaded installer, following error comes: "Unzip failed: Error opening ZIP file"
I however installed SDK from another link:
https://cloud.google.com/sdk/downloads#versioned

3. Unable to install alpha component. Used this command:
gcloud components install alpha

4. Deploying the function: 
ERROR: (gcloud.alpha.functions.deploy) ResponseError: status=[403], code=[Forbid
den], message=[Cannot access Google Cloud Functions API in project gcf-project-1
]

If anybody knows the solution, please help.

Thanks,
Robin
4

3 回答 3

8

这可能很愚蠢,但请务必在 gcloud 仪表板网站上的项目设置中启用云功能 api。

在此处输入图像描述

于 2017-05-09T00:10:58.643 回答
1

Google Cloud Functions 刚刚作为公开测试版发布。命令略有不同(例如,您不安装 alpha 组件)!它现在应该可以在没有白名单的情况下工作。

https://cloud.google.com/functions/

于 2017-03-11T21:56:03.230 回答
0

Google Cloud Functions 目前处于 Alpha 阶段,这意味着它只是白名单。您收到此错误是因为您的帐户未列入白名单。您需要注册才能访问 Alpha,您可以在此处进行

于 2016-08-02T23:02:42.927 回答