简体   繁体   English

无法使用appcfg命令在Google App Engine上下载已部署应用程序的源代码

[英]Not able to download the source code of a deployed application on Google App Engine using appcfg command

I'm using java and have deployed some applications on Google App Engine and trying to download the source code for one of the deployed applications using the command line tool appcfg however with no luck. 我正在使用Java,并已在Google App Engine上部署了一些应用程序,并尝试使用命令行工具appcfg下载其中一个已部署应用程序的源代码,但是运气不佳。 It's not able to authenticate and I'm not able to figure out why ? 它无法进行身份验证,我也无法弄清楚为什么?

Here's the command that I'm using : 这是我正在使用的命令:

appcfg -A mailboxsigma download_app c:\users\rkumar2\desktop\destination

After issuing the command here's the output : 发出命令后,输出如下:

Oct 27, 2014 10:04:32 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0
x80000002. Windows RegCreateKeyEx(...) returned error code 5.
0% Fetching file list...
Oct 27, 2014 10:04:35 PM com.google.appengine.tools.admin.AbstractServerConnecti
on send1
WARNING: Error posting to URL: https://appengine.google.com/api/files/list?app_i
d=mailboxsigma&
401 Unauthorized
Must authenticate first.
This is try #0
Email: raghvendra1669@gmail.com
Password for raghvendra1669@gmail.com:
Email:

As you can see in the output that after I enter my gmail credentials ie email and password it starts asking again for the email so I do it again and upon repetitively entering the credentials it fails. 正如您在输出中看到的那样,在我输入我的gmail凭据(即电子邮件和密码)之后,它再次开始询问电子邮件,因此我再次执行此操作,并在重复输入凭据后失败。

I checked my App Engine Console for correctness of the deployed application's identifier and found it to be correct. 我检查了App Engine控制台中已部署的应用程序标识符的正确性,并发现它是正确的。 What am I missing here ? 我在这里想念什么?

Email: raghvendra1669@gmail.com
Password for raghvendra1669@gmail.com:
Email: raghvendra1669@gmail.com
Password for raghvendra1669@gmail.com:

Error Details:
Email "raghvendra1669@gmail.com" and password do not match.

Unable to fetch file list

.

Google disables login via apps deemed "less secure". Google会通过被认为“不太安全”的应用程序禁用登录。 This includes the appcfg in the SDK. 这包括SDK中的appcfg What you can do is enable less secure apps . 您可以做的就是启用不太安全的应用程序

Alternatively, you can use OAuth2 . 或者,您可以使用OAuth2

As command line authentication has been disabled due to security reasons we can use OAuth2 for authentication. 由于出于安全原因禁用了命令行身份验证,因此我们可以使用OAuth2进行身份验证。 To use the same from the command line we need to indicate that we are going to use OAuth2 for authentication by passing an argument in the command --auth2 . 要从命令行使用相同的内容,我们需要通过在命令--auth2传递一个参数来表明我们将使用OAuth2进行身份验证。 So command would look something like this : 所以命令看起来像这样:

appcfg -A mailboxsigma --oauth2 download_app  c:\users\rkumar2\desktop\destination

After issuing this command it opens up a authentication window in the browser and when you accept the authentication it will generate a key which you need to enter in the command prompt and your download starts. 发出此命令后,它将在浏览器中打开一个身份验证窗口,当您接受身份验证时,它将生成一个密钥,您需要将其输入命令提示符并开始下载。

Note : Downloading an app will downloads all .class files and not really the source files so you need to decompile using a suitable decompiler. 注意:下载应用程序将下载所有.class文件,而不是真正的源文件,因此您需要使用合适的反编译器进行反编译。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM