How do I download GAE source

6,427 views
Skip to first unread message

Hirose Office

unread,
Mar 13, 2021, 1:52:57 PM3/13/21
to Google App Engine
help me!

i execute this command.

python appcfg.py download_app -A my-project -V 1 /users/tom/downloads/aaa --noauth_local_webserver

error message is

Error 401: --- begin server output ---
1.433060072632129757
<ApiError 401, Message: "Rejected by creds_policy: Permission 'auth.creds.useNormalUserEUC' not granted to app-engine...@prod.google.com, because it satisfies none of the 3 rules granting that permission. (Policy {type=creds, id=/apps/framework/auth/v0/mapping0/aadd275b-0eb6-45c5-ba7e-e1a184e053ef}); RpcSecurityPolicy http://rpcsp/p/9aw5LWxoo9BLqcVKVlGreN0-Q5-wt_0mk2RWLjm140U 
com.google.security.context.validation.CredsPermissionException: Rejected by creds_policy: Permission 'auth.creds.useNormalUserEUC' not granted to app-engine...@prod.google.com, because it satisfies none of the 3 rules granting that permission. (Policy {type=creds, id=/apps/framework/auth/v0/mapping0/aadd275b-0eb6-45c5-ba7e-e1a184e053ef}); RpcSecurityPolicy http://rpcsp/p/9aw5LWxoo9BLqcVKVlGreN0-Q5-wt_0mk2RWLjm140U ">
--- end server output ---

Kaan

unread,
Mar 13, 2021, 2:05:17 PM3/13/21
to Google App Engine
appcfg.py is depracated but I couldn't find the new method with gcloud either

A S.O. answer says the source is available here: https://console.cloud.google.com/cloud-build/builds - but it's not for me - but maybe it's available for you, might be worth checking

Kaan

unread,
Mar 14, 2021, 9:57:20 AM3/14/21
to Google App Engine

Hirose Office

unread,
Mar 14, 2021, 2:36:35 PM3/14/21
to Google App Engine
Hello, kaan.

Thank you!
I appreciate it very much
The source could not be downloaded with Cloud Build.
Consider another method.

Thank you
2021年3月14日日曜日 4:05:17 UTC+9 kaan...@gmail.com:

Kaan

unread,
Mar 14, 2021, 2:57:00 PM3/14/21
to Google App Engine

Hirose Office

unread,
Mar 15, 2021, 11:01:04 AM3/15/21
to Google App Engine
Thank you for your message. However, I couldn't download it by any method.
Give up once.

THank you, kaan.

2021年3月15日月曜日 3:57:00 UTC+9 kaan...@gmail.com:

gonzalezwalter

unread,
Mar 15, 2021, 5:04:55 PM3/15/21
to Google App Engine
Hello, 

You can view and copy the source code in Console -> App Engine -> Versions -> press 'tools' under specific version and choose 'source'. The files themselves are stored in staging.<project_id>.appspot.com bucket although under encrypted names and it might take some time to find specific version.

Let me know if you are unable to view them through the methods above.  

Hirose Office

unread,
Mar 16, 2021, 12:04:31 AM3/16/21
to Google App Engine
thank you

The file exists in Bucket, but the filename has been renamed. The folder cannot be found either. Therefore, it was not possible to download the source code this way.

Thank you for your opinion.

2021年3月16日火曜日 6:04:55 UTC+9 gonzalezwalter:

Elliott (Cloud Platform Support)

unread,
Mar 18, 2021, 2:48:42 PM3/18/21
to Google App Engine

Hello,

I understand that you would like to download your source code using the command. I have looked at our documentation and found that the command, appcfg.py, is deprecated and that the Google Cloud SDK does not support downloading the source code[1].

There is an alternative as mentioned here[2] where you can view the code, then manually copy and paste it to your local machine. “As of October 2019 you can simply go to --> App Engine --> Services and in the tool dropdown select 'source' and the source code is there”

I would like to investigate further. To do this, can you tell me what kind of App Engine you are using?

I know this is not ideal but it is a workaround but this is something you can try if in the meantime.

[1] https://cloud.google.com/appengine/docs/standard/python/tools/downloading-source-code

[2] https://stackoverflow.com/questions/2497338/how-do-i-download-the-source-code-of-a-google-app-engine-project/28142173#:~:text=Under%20the%20main%20menu%2C%20under,of%20your%20compressed%20code%20begins.

Thank you.

Hirose Office

unread,
Mar 19, 2021, 10:03:14 PM3/19/21
to Google App Engine
Thank you, Elliott.

but I can not find 'source' button.

maybe, it's a old menu.

i gave up.

no ploblem.

thanks.


2021年3月19日金曜日 3:48:42 UTC+9 Elliott (Cloud Platform Support):

vladoi

unread,
Mar 22, 2021, 7:17:15 AM3/22/21
to Google App Engine
Hello, 

I continued investigating your issue and I found that you can only view and copy the source code.  

A feature request was opened for adding a button in order to download the source code. 

 Please star this PIT in order to receive the new updates [1].-------------------------

Hirose Office

unread,
Mar 22, 2021, 8:01:39 AM3/22/21
to Google App Engine
good comment for GAE user.

2021年3月22日月曜日 20:17:15 UTC+9 vladoi:
Reply all
Reply to author
Forward
0 new messages