Google App Engine - 部署失败,错误1:未经授权

时间:2014-08-19 15:15:19

标签: php google-app-engine

我正在努力让我的第一个(PHP)应用程序正常运行。它在Google App Engine Launcher中运行正常,但是当我尝试部署它时,我收到以下消息:

2014-08-19 15:37:58 Running command: "['C:\\Program Files\\Python\\pythonw.exe', '-u', 'C:\\Program Files\\Google\\google_appengine\\appcfg.py', '--no_cookies', u'--email=by@onetel.com', '--passin', 'update', 'C:\\Documents and Settings\\Barry\\My Documents\\test\\high-winter-668']"
03:38 PM Application: high-winter-668; version: 1
03:38 PM Host: appengine.google.com
03:38 PM 
Starting update of app: high-winter-668, version: 1
03:38 PM Getting current resource limits.
Password for b...@...com: Invalid username or password.
2014-08-19 15:38:08,967 ERROR appcfg.py:2411 An error occurred processing file '': HTTP Error 401: Unauthorized. Aborting. 
Error 401: --- begin server output ---
Must authenticate first.
--- end server output ---

我可以登录我在appengine.google.com

创建的应用程序

我使用正确/相同的电子邮件地址和密码。 我可以看到服务器/本地时差是问题的其他主题。我的本地PC时间与上述错误信息中的时间相同。

我有什么问题?

此外: 我尝试在命令行上使用appcfg.py并遇到另一个问题: 它错误地说我没有“high-winter-668.yaml”文件。所以我将“app.yaml”的名称改为“high-winter-668.yaml” - 然后它抱怨我没有在yaml文件中指定一个“模块”。 同时Google App Engine Launcher错误地说我没有“app.yaml”文件。 它们是由不同的公司写的!! ??

3 个答案:

答案 0 :(得分:45)

好吧,在挣扎的时候,我找到了答案。

我去了这里: https://www.google.com/settings/security/lesssecureapps

并选择“启用”安全性较低的设备和应用来访问您的数据。 当我尝试部署时 - 它有效。

答案 1 :(得分:3)

如果您激活了2-FACTOR身份验证,则会发生这种情况。在这种情况下,解决方案是转到application-specific passwords page并生成新密码。您可以将其命名为" Google app engine"等等,您将获得一个长字母字符串,以便在部署时用作密码。

如果您使用Google App Engine Launcher并且使用2因素,则可以保证在部署(当前版本1.9.17)时遇到此错误,并且至少已经存在了1。5年。似乎应用程序引擎启动程序人员可以捕获该错误并生成有用的消息,但也许您可以在stackoverflow上找到它:)

答案 2 :(得分:1)

这件事发生在我身上,因为我忘记了app.yaml中的版本行: 版本:1

相关问题