Search code examples
pythoncloud

How can I download my project source code from google cloud console


When i issued this command (appcfg.py -A rrrrr -V 1 download_app /C) to download source code from the Google Cloud Shell, I get this error message:

Python 2 is deprecated. Upgrade to Python 3 as soon as possible. See https://cloud.google.com/python/docs/python2-sunset

To suppress this warning, create an empty ~/.cloudshell/no-python-warning file. The command will automatically proceed in seconds or on any key.


10:33 AM Host: appengine.google.com
10:33 AM Fetching file list...
Error 401: --- begin server output ---
1.434068975362424615
<ApiError 401, Message: "Rejected by creds_policy: Permission 'auth.creds.useNormalUserEUC' not granted to [email protected], because it satisfies none of the 3 rules granting that permission. (Policy {type=creds, id=/apps/framework/auth/v0/mapping0/247afb42-c0c2-4579-9534-4d81ab6e915f}); RpcSecurityPolicy http://rpcsp/p/5frrBmXyY2vYXBQ1ey0O2q71nxZ-SEboQ9bDWATZ7oA
com.google.security.context.validation.CredsPermissionException: Rejected by creds_policy: Permission 'auth.creds.useNormalUserEUC' not granted to [email protected], because it satisfies none of the 3 rules granting that permission. (Policy {type=creds, id=/apps/framework/auth/v0/mapping0/247afb42-c0c2-4579-9534-4d81ab6e915f}); RpcSecurityPolicy http://rpcsp/p/5frrBmXyY2vYXBQ1ey0O2q71nxZ-SEboQ9bDWATZ7oA ">
--- end server output ---

Solution

  • appcfg.py is part of the old SDK which has been deprecated and no longer works (source). Google has no direct replacement for appcfg.py download.

    There are some possible work arounds as documented on this stackoverflow question.

    Our App, nocommandline.com, also supports download with some caveats. See full details on our answer to that previous stackoverflow question. We also have an article on our blog about it. That article also gives you a tip on how to ensure your source code is available for download in the future.