Google 云应用引擎部署:未找到应用

Google Cloud appengine deployment: No app found

我继承了一个使用 google appengine 的 php 代码库,所以我在本地有一个完全构建的应用程序,我正在尝试部署它。但是当我 运行:

gcloud app deploy --project project-name --verbosity=debug

我收到以下错误。我不明白暂存命令错误,因为在 app.yaml 中我指定了 runtime: php55。我不知道 API 端点错误是什么意思,我也不明白为什么找不到应用程序。任何对这些错误的帮助将不胜感激。

DEBUG: Running [gcloud.app.deploy] with arguments: [--project: "project-name", --verbosity: "debug"] DEBUG: No staging command found for runtime [php55] and environment [STANDARD]. DEBUG: API endpoint: [https://appengine.googleapis.com/], API version: [v1] DEBUG: No app found: Traceback (most recent call last): File "/Users/myname/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 679, in _PossiblyCreateApp return api_client.GetApplication() File "/Users/myname/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 66, in GetApplication return self.client.apps.Get(request) File "/Users/myname/Downloads/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/appengine/v1/appengine_v1_client.py", line 1124, in Get config, request, global_params=global_params) File "/Users/myname/Downloads/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 722, in _RunMethod return self.ProcessHttpResponse(method_config, http_response, request) File "/Users/myname/Downloads/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 728, in ProcessHttpResponse self.__ProcessHttpResponse(method_config, http_response, request)) File "/Users/myname/Downloads/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 599, in __ProcessHttpResponse http_response, method_config=method_config, request=request) HttpNotFoundError: HttpError accessing https://appengine.googleapis.com/v1/apps/project-name?alt=json: response: <{'status': '404', 'content-length': '136', 'x-xss-protection': '0', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Tue, 24 Sep 2019 22:49:44 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="46,43"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": { "code": 404, "message": "Could not find Application \"project-name\".", "status": "NOT_FOUND" } }

--project 的值必须对应于 Google Cloud Platform 项目 ID。

不清楚您在粘贴问题时是否将实际项目 ID(注意项目 ID 和项目名称是不同的属性,请参阅 link)替换为 project-name

验证项目是否存在的一种方法是:

gcloud projects describe [[PROJECT]]

假设项目存在,第二个考虑因素是(因为您没有指定 deployables),该命令假设工作目录包含一个 app.yaml(App Engine 应用程序配置)文件。