【问题标题】:Can't upload (deploy) to Google App Engine with app-cfg无法使用 app-cfg 上传(部署)到 Google App Engine
【发布时间】:2014-11-17 02:59:42
【问题描述】:

我可以使用 Google App Engine Launcher 将我的文件部署(上传)到 Google App Engine,但我无法使用 appcfg 命令执行此操作。我尝试使用--oauth2 而没有--oauth2。

$ $APP_ENGINE/appcfg.py --email=my.account@gmail.com --oauth2 update myapp
06:49 PM Application: myapp; version: 20141116
06:49 PM Host: appengine.google.com
06:49 PM 
Starting update of app: myapp, version: 20141116
06:49 PM Getting current resource limits.
06:49 PM Scanning files on local disk.
06:49 PM Scanned 500 files.
Error 404: --- begin server output ---
This application does not exist (app_id=u'myapp').
--- end server output ---


$ $APP_ENGINE/appcfg.py --email=my.account@gmail.com update myapp
06:54 PM Application: myapp; version: 20141116
06:54 PM Host: appengine.google.com
06:54 PM 
Starting update of app: myapp, version: 20141116
06:54 PM Getting current resource limits.
Password for my.account@gmail.com: 
Invalid username or password.

我确定我为我的 gmail 输入了正确的密码(并且我禁用了应用程序专用密码。)但它说我输入了错误的密码。

我有另一个应用引擎帐户,我仍然可以为我的另一个帐户进行部署。

我想知道在我为 Google App Engine 使用多个帐户时,我在凭据或指定正确帐户方面遇到了一些问题。

如何将我的应用部署到服务器?

谢谢,

【问题讨论】:

  • 您系统上的令牌可能已损坏。使用此标志而不是 oauth '--noauth_local_webserver' 并让我知道它是否有效。它会为您提供一个链接,将其粘贴到您的网络浏览器中,获取令牌并将其粘贴回控制台。
  • 谢谢瑞恩。我使用 --noauth_local_webserver 运行,但需要像上面那样输入密码。我认为令牌中的某些内容也已损坏。
  • cloud.google.com/sdk/gcloud/reference/auth 执行“gcloud auth list”以查看您的所有令牌。 'gcloud auth revoke' 将它们全部清除
  • 谢谢。瑞安。我安装了云 SDK 并运行了“gcloud auth list”。该列表没有我要使用的帐户。 “gcloud auth revoke”显示 HTTPError。然后我尝试了“gcloud auth login MY_ACCOUNT”。我成功了,但是当我运行 'appcfg.py --email=my.account@gmail.com --oauth2 update myapp' 时仍然出现同样的错误
  • 是否有活动帐户集?运行“gcloud config set account”,然后运行该帐户。然后运行一个普通的appcfg(即appcfg.py update myapp)

标签: google-app-engine


【解决方案1】:

我今天遇到了这个麻烦,它让我耽误了 2 个小时。 最终在上面的cmets中找到了这个

rm ~/.appcfg_oauth2_tokens 

直接回到 AppEngineLaucher.app,它第一次运行。 感谢以上[Daisuki Honey] 的修复。

【讨论】:

    【解决方案2】:

    您首先需要在http://appengine.google.com/ 上创建一个应用程序。作为创建应用程序的一部分,您将选择一个应用程序 ID。创建应用后,编辑 app.yaml 文件并查找以下行:

    application: myapp
    

    您需要将“myapp”替换为您选择的应用程序 ID。

    【讨论】:

    • 其实我已经有了app ID,用App Engine Launcher部署成功了。
    • 这是我的解决方案
    猜你喜欢
    • 2012-02-11
    • 2020-05-06
    • 2015-02-19
    • 2018-11-22
    • 1970-01-01
    • 2023-03-02
    • 1970-01-01
    • 2017-05-01
    • 1970-01-01
    相关资源
    最近更新 更多