简体   繁体   中英

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. 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.

I checked my App Engine Console for correctness of the deployed application's identifier and found it to be correct. 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". This includes the appcfg in the SDK. What you can do is enable less secure apps .

Alternatively, you can use OAuth2 .

As command line authentication has been disabled due to security reasons we can use OAuth2 for authentication. 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 . 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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