gpt4 book ai didi

django - 无法将项目部署到 Google Cloud App Engine Standard

转载 作者:行者123 更新时间:2023-12-02 19:16:02 29 4
gpt4 key购买 nike

我有一个一直运行良好的项目,但我想进行一些更改并解决一些错误,因此我尝试使用 Google Cloud SDK 部署我的应用程序(gcloud 应用程序部署)

Services to deploy:

descriptor: [/home/projects/Myproject/app.yaml]
source: [/home/projects/Myproject/]
target project: [my-project]
target service: [default]
target version: [20200902t153320]
target url: [https://my-project.uc.r.appspot.com]


Do you want to continue (Y/n)?

Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 2 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build 3ebf37fb-b18d-4c68-b352d-10bd8758f90b0 status: FAILURE
Error type: OK
Full build logs: https://console.cloud.google.com/cloud-build/builds/3ebf37fb-b18d-4c68-b32d-10bd8s78f90b0?project=my-projectid

这昨天工作正常,但现在它给了我这个错误,我无法进行任何更改:

ERROR: build step 6 "us.gcr.io/gae-runtimes/buildpacks/python38/builder:python38_20200816_3_8_5_RC01" failed: step exited with non-zero status: 246
ERROR
Finished Step #6 - "exporter"
Step #6 - "exporter": ERROR: failed to export: failed to write image to the following tags: [us.gcr.io/my-project/app-engine-tmp/app/ttl-2h/default/buildpack-app:latest: GET https://us.gcr.io/v2/token?scope=repository%3Amy-project%2Fapp-engine-tmp%2Fapp%2Fttl-2h%2Fdefault%2Fbuildpack-app%3Apush%2Cpull&scope=repository%3Agae-runtimes%2Fbuildpacks%2Fpython38%2Frun%3Apull&service=us.gcr.io: DENIED: Token exchange failed for project 'my-project'. Access denied.]
Step #6 - "exporter": *** Digest: sha256:bd8121f23cb362683e7c32a8bbdf2a900606373f8edfsdf36fe0ffb17014
Step #6 - "exporter":
Step #6 - "exporter": us.gcr.io/my-project/app-engine-tmp/app/ttl-2h/default/buildpack-app:latest - GET https://us.gcr.io/v2/token?scope=repository%3Amy-project%2Fapp-engine-tmp%2Fapp%2Fttl-2h%2Fdefault%2Fbuildpack-app%3Apush%2Cpull&scope=repository%3Agae-runtimes%2Fbuildpacks%2Fpython38%2Frun%3Apull&service=us.gcr.io: DENIED: Token exchange failed for project 'my-project'. Access denied.
Step #6 - "exporter": *** Images (sha256:bd8121f23cb362683e7c32adfssd73f8ea51326f36fe0ffb17014):

我尝试更改我的身份验证,因此我使用 gcloud auth revoke 和 gcloud app login 来刷新它们。我还删除了存储中的文件并重新加载。我什至尝试将代码上传到 GitHub 并使用激活器从那里进行部署。注意到似乎有效。

该项目拥有所有权限。服务帐户已启用。我只是不明白出了什么问题。我没有使用 Docker,因此我没有更改标准应用引擎中的任何默认配置

最佳答案

我最近遇到过这个问题。

计费并不总是问题。有时,如果没有进行任何更改,并且您尝试再次部署相同的版本,也会产生此问题。

两种解决方法(不是解决方案)

  1. 使用随机版本控制方案而不是 --version SOME_STATIC_VALUE
  2. 确保部署的代码中有一些更改。

关于django - 无法将项目部署到 Google Cloud App Engine Standard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63712861/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com