我正在尝试使用gcloud app deploy
将.net核心应用程序从Google Compute VM部署到Google App Engine。我收到以下错误
> WARNING: We couldn't validate that your project is ready to deploy to App Engine Flexible Environment. If deployment fails, please check the following mess
age and try again:
Server responded with code [400]:
Bad Request Unexpected HTTP status 400.
Failed Project Preparation (app_id='s~project-id'). Out of retries. Last error: Temporary error occurred while verifying project: TEMPORARY_ERROR: Unabl
e to check API status
Beginning deployment of service [default]...
WARNING: Deployment of App Engine Flexible Environment apps is currently in Beta
Building and pushing image for service [default]
Some files were skipped. Pass `--verbosity=info` to see which ones.
ERROR: (gcloud.app.deploy) Could not copy [/tmp/tmpLwvVOb/src.tgz] to [us.gcr.io/project-id/appengine/default.20170118t043919:latest]: HttpError accessing
<https://www.googleapis.com/resumable/upload/storage/v1/b/staging.project-id.appspot.com/o?uploadType=resumable&alt=json&name=us.gcr.io%2Fcasepro-v3%2Fappe
ngine%2Fdefault.20170118t043919%3Alatest>: response: <{'status': '403', 'content-length': '166', 'vary': 'Origin, X-Origin', 'server': 'UploadServer', 'x-g
uploader-uploadid': 'AEnB2UqprxH-2tIhsSZdGxDOtS8UnWSI29YTo4kaptNK67SWJpLVqR0zEtCAHgFyE64wj1HfCyUL5sy9z4AZkTRFYuxXfdw5TA', 'date': 'Wed, 18 Jan 2017 04:40:0
0 GMT', 'alt-svc': 'quic=":443"; ma=2592000; v="35,34"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Forbidden"
}
],
"code": 403,
"message": "Forbidden"
}
}
>. Please retry.
我已经启用了计费 API、应用引擎管理员 API 和存储 API。正在使用的服务 A/C 具有编辑者权限。VM 实例是使用 Jenkins Bitnami 包的云启动器创建的。在配置 Jenkins 执行相同操作之前,我正在尝试从 vm 的命令行部署应用程序。
如何解决这个问题?
问题是gcloud app deploy
正在尝试部署到项目 ID 'project-id',它不能是你的项目 ID。
尝试按如下方式设置项目:
gcloud config set project MY-PROJECT-ID
然后,重试gcloud app deploy
命令。
如果此操作失败,请使用完整的gcloud
命令行以及这两个命令的结果进行回复:
gcloud config list
gcloud version