gpt4 book ai didi

google-app-engine - 如何在 App Engine 上部署标准 Go 应用程序

转载 作者:行者123 更新时间:2023-12-03 23:30:31 26 4
gpt4 key购买 nike

我在 Google Cloud Platform 上创建了一个 App Engine 项目并遵循了一个非常基本的 quick start tutorial对于 Go,但是当尝试使用 gcloud app deploy 部署我的应用程序时,它看起来像是在尝试使用 Docker(灵活环境)进行部署,而我想使用标准环境进行部署。如何避免使用 Docker 并部署此应用程序?

$ gcloud app deploy
<...>

Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 1 file to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build ... status: FAILURE.
Error ID: 581A171A.
Error type: BuildError.
Error message: 2019/07/25 23:59:26 Building from Go source in /tmp/staging/srv/gopath/src/<project_name>, with main package at <project_name>
2019/07/25 23:59:26 Building /tmp/staging/srv/gopath/src/<project_name>, saving to /tmp/staging/usr/local/bin/start
2019/07/25 23:59:30 Wrote build output to /builder/outputs/output
2019/07/25 23:59:30 Wrote output to /tmp/staging/usr/local/bin/start
2019/07/25 23:59:30 Making tarball /tmp/tar-out406385400/app.tar.gz
2019/07/25 23:59:31 Creating app image on GCR: <...>
2019/07/25 23:59:32 Failed to create app image on GCR: [/bin/appender.par --src-image us.gcr.io/gae-runtimes/go112:go112_20190613_1_12_6_RC00 --tarball /tmp/tar-out406385400/app.tar.gz --dst-image us.gcr.io/<project_name>/app-engine-tmp/app/ttl-2h:4d75e939-3879-42b5-8fec-da14ad651baf]: Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/bin/appender.par/__main__.py", line 90, in <module>
File "/bin/appender.par/__main__.py", line 79, in main
File "/bin/appender.par/containerregistry/client/v2_2/docker_session_.py", line 71, in __init__
File "/bin/appender.par/containerregistry/client/v2_2/docker_http_.py", line 198, in __init__
File "/bin/appender.par/containerregistry/client/v2_2/docker_http_.py", line 301, in _Refresh
containerregistry.client.v2_2.docker_http_.TokenRefreshException: Bad status during token exchange: 403
{"errors":[{"code":"DENIED","message":"Token exchange failed for project '<project_name>'. Access denied."}]}.

最佳答案

我遇到了完全相同的错误。我尝试切换到另一种语言只是为了确保错误仍然与访问被拒绝有关。我的猜测是账单。我有一个从未启用过计费的旧帐户。免费试用 300 美元。在过去,我们能够在不设置计费的情况下注册和部署标准 AppEngine。一旦我启用计费(使用那些 300 美元的免费试用 😉),部署就成功了。

关于google-app-engine - 如何在 App Engine 上部署标准 Go 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57211539/

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