firebase的Cron作业-谷歌云IO错误
我最近刚刚设置了Firebase函数。在完成一个简单的helloWorld函数之后,我想在下面设置一个cron作业。 在这一步中,我总是会遇到一个错误:firebase的Cron作业-谷歌云IO错误,firebase,google-app-engine,cron,google-cloud-firestore,google-cloud-functions,Firebase,Google App Engine,Cron,Google Cloud Firestore,Google Cloud Functions,我最近刚刚设置了Firebase函数。在完成一个简单的helloWorld函数之后,我想在下面设置一个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
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:\\\
下创建一个app.yaml
文件,而不是包含app.yaml
和cron.yaml
文件的functions cron
文件夹
非常感谢您的帮助!!有关更多信息,我正在使用windows..为了使任何Google应用程序引擎部署都能正常工作,需要一个名为“App.yaml”的配置文件。官方网站上有一篇关于可能的参数和配置的文章
此问题看起来与在云中写入的权限无关,而是与在本地计算机C:中写入的权限有关。我的建议是,您在部署之前创建该文件,这样gcloud就不需要被授予在本地计算机中写入的管理员权限。云SDK似乎确实在尝试创建app.yaml文件,这意味着您的文件夹
C:\Users\vreee\Firebase\functions cron\appengine
中没有app.yaml文件。根据您链接的教程,当您运行deploy命令时,app.yaml和cron.yaml文件都应该位于该目录中
因此,您的选择是:
- 如果您已经部署了一个应用程序,并且您的app.yaml文件没有更改(即它已经为您的cron作业声明了端点),则可以从
文件夹运行以下命令,仅上载cron.yaml文件:\functions cron\appengine
gcloud app deploy cron.yaml
- 否则,您需要将两个文件放在同一文件夹中,并运行命令
gcloud app deploy app.yaml cron.yaml
appengine
中既有app.yaml,也有cron.yaml。我克隆了与我遵循的教程中命名的项目完全相同的项目。所以不要明白,为什么要在'C:'更新:我试着分别部署它们……显然,这现在起作用了!谢谢:)请尝试gcloud app deploy app.yaml cron.yaml
,不要在两个文件之间使用\键。