2014-10-27 64 views
1

我正在使用java并在Google App Engine上部署了一些应用程序,并尝试使用该应用程序下载其中一个已部署应用程序的源代码然而命令行工具appcfg没有运气。它无法验证,我无法弄清楚为什么?无法使用appcfg命令在Google App Engine上下载已部署应用程序的源代码

下面是我使用的命令:

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

这里发出命令后是输出:

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: [email protected] 
Password for [email protected]: 
Email: 

正如你可以在输出,我进入后我的Gmail凭证,即看电子邮件和密码它开始再次询问电子邮件,所以我再次这样做,并重复输入凭证失败。

我检查了我的App Engine控制台,了解部署的应用程序标识符的正确性,发现它是正确的。我在这里错过了什么?

Email: [email protected] 
Password for [email protected]: 
Email: [email protected] 
Password for [email protected]: 

Error Details: 
Email "[email protected]" and password do not match. 

Unable to fetch file list 

回答

2

由于安全原因,命令行认证已被禁用,我们可以使用OAuth2进行认证。要从命令行使用相同的命令,我们需要通过在命令--auth2中传递参数来指示我们将使用OAuth2进行身份验证。 所以命令会是这样的:

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

发布它开辟了在浏览器中验证窗口此命令后,当您接受身份验证它会产生你需要在命令提示符下输入键和您的下载开始。

注意:下载应用程序将下载所有.class文件,而不是真正的源文件,因此您需要使用合适的反编译器进行反编译。

2

Google禁止通过视为“不太安全”的应用登录。这包括SDK中的appcfg。你可以做的是enable less secure apps。可以使用OAuth2

+0

不能相信这个问题被投下来。不公平。我知道这个问题有很多人不知道答案。 – 2014-10-28 01:47:48

相关问题