我最近刚设置了Firebase函数。在使一个简单的helloWorld函数工作之后,我想在这个Google博客教程之后设置一个cron作业。在这个步骤中,我总是会遇到一个错误:
gcloud app deploy app.yaml \ cron.yaml
我收到以下错误消息:
C:\Users\vreee\Firebase\functions-cron\appengine>gcloud app deploy app.yaml \
cron.yaml
WARNING: Automatic app detection is deprecated and will soon be removed. As
an alternative, create an app.yaml file yourself using the directions at
https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml (App Engine Flexible Environment) or
https://cloud.google.com/appengine/docs/standard/python/config/appref (App
Engine Standard Environment) under the tab for your language.
Deployment to Google App Engine requires an app.yaml file. This
command will run `gcloud beta app gen-config` to generate an app.yaml
file for you in the current directory (if the current directory does
not contain an App Engine service, please answer "no").
Do you want to continue (Y/n)? y
This looks like a Python app. If so, please enter the command to run
the app in production (enter nothing if it's not a python app): :
Writing [app.yaml] to [C:\].
ERROR: gcloud crashed (IOError): [Errno 13] Permission denied:
u'C:\\app.yaml'
If you would like to report this issue, please run the following command:
gcloud feedback
To check gcloud for common problems, please run the following command:
gcloud info --run-diagnostics有人知道怎么解决这个问题吗?我搜索并设置我自己的电子邮件地址(不是服务帐户)作为所有者,所以许可应该在那里。我只是注意到它试图直接在C:\\下创建一个C:\\文件,而不是包含app.yaml和cron.yaml文件的functions-cron文件夹。
真的很感谢你的帮助!!要了解更多信息,我正在使用windows..。
发布于 2018-06-25 10:42:16
为了使Google部署工作,一个名为"App.yaml“的配置文件是必要的。官方文档中有一篇关于可能的参数和配置的文章。
这个问题看起来与在云中写入的权限无关,而是与在本地机器C:中写入的权限有关。我的建议是在部署之前创建文件,这样就不需要授予gcloud在本地机器中写入的管理权限。
https://stackoverflow.com/questions/51016967
复制相似问题