Google App Engine Make a rollback with appcfg.sh

2020-05-24 11:02发布

I'm trying to make a rollback due a deploy failed, my server code is on java, and also i'm using App Engine Eclipse PlugIn for. my appcfg.sh file is located at /Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh


but i get "Command not Found" when i try this sudo /Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh rollback /Documents/workspace/server_side/war

I can't realize what's wrong. i don`t know if is the right appcfg, because there is appcfg.cmd and appcfg.sh, i'm using an imac(Unix enviro) so i use the appcfg.sh to made the rollback. i've tried in several different ways. and nothing good happen. maybe i'm missing something. thanks!

5条回答
放我归山
2楼-- · 2020-05-24 11:24

I also encountered the same problem as the original poster of this question, but I still got a permission denied error when attempting to rollback, even after changing the permissions of the appcfg.sh file.

It turned out I also needed to chmod 755 run_java.sh (located in the same directory as appcfg.sh), and then I was able to rollback without problems.

I thought I would post this in case anyone encountered the same set of issues that I did.

查看更多
3楼-- · 2020-05-24 11:25

It does not have execute permission by default:

-rw-r--r--  1 yorkw  staff   558 11 Dec 06:01 appcfg.sh

Run chmod 755 appcfg.sh to change the permission:

-rwxr-xr-x  1 yorkw  staff   558 11 Dec 06:01 appcfg.sh

Then you should be able to run it in terminal.

查看更多
萌系小妹纸
4楼-- · 2020-05-24 11:25

Use the following commands on OSX. Note the appcfg.sh doesn't have execute permission by default so you need to add it via chmod.

cd /Users/Labuser/Downloads/appengine-java-sdk-1.9.22/bin

chmod 755 appcfg.sh

sh appcfg.sh rollback /Users/Labuser/Ducuments/AndroidWS/AndroidStudioProjects/AndroidProject/modulebackend/src/main/webapp/
查看更多
狗以群分
5楼-- · 2020-05-24 11:46

For anyone else who stumbles upon this and wants more detail...

In Terminal go to GAE-SDK-PATH/bin (where appcfg.sh is located) for instance:

/Applications/Eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.8.3/appengine-java-sdk-1.8.3/bin

You may not have enabled permissions with appcfg.sh, so do what @yorkw suggested if you are getting 'Permission Denied', in the bin directory type:

chmod 755 appcfg.sh

then to rollback type

./appcfg.sh --email=PROJECT_EMAIL --passin rollback ROOT_PROJECT_FOLDER/war

You will be prompted to enter the password for the project email, and then it should work! Google doc: https://developers.google.com/appengine/docs/java/tools/uploadinganapp

查看更多
爷、活的狠高调
6楼-- · 2020-05-24 11:49

Maybe you made the same silly oversight as me and left out "sh" at the beginning? i.e.

sh /Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh rollback /Documents/workspace/server_side/war
查看更多
登录 后发表回答