OpenShift action_hooks are not executable

When I created a test DIY application in OpenShift, the action_hooks worked fine, but now I created an actual application and they just don’t fire when I push changes.

I did some investigating, and I found the problem – for some reason the action hooks are not executable. I checked and they were executable in the test application(where they worked) – but now they aren’t.

chmoding them doesn’t help, since every time I push some changes OpenShift copies the new repo folder over the old one(instead of using git to update it), so the permissions are reset. I looked into using git’s post-receive hook to make them executable, but the git hooks on OpenShift are protected and I can’t edit them.

Is there any way to solve this problem?

PS. I don’t know if it has any impact, but my actual development repo is on Google Code, and I used this tutorial to set the OpenShift repo as an upstream for my local repo.

  • How do you set up a local dev environment to mimic production Ghost env on OpenShift?
  • How can i connect openshift git repository to bitbucket
  • Automatically Deploy Feature Branches in OpenShift
  • cant checkout external git repo in jenkins
  • git post_deploy hook list of changed files (openshift)
  • Installing Kohana on OpenShift?
  • Continuously deploy two branches to two separate openshift applications on Travis CI?
  • Error upon adding cartridge to OpenShift app
  • 2 Solutions collect form web for “OpenShift action_hooks are not executable”

    In the OpenShift tooling for JBoss Tools, we faced the very same problem. Our implementation was resetting the execute permissions on the hook files causing the hooks to get ignored: https://issues.jboss.org/browse/JBIDE-13217
    In our case having +x on these again solved the issue. You seem report some repo being copied over yours, which I dont really get. How is this occurring to you? It could help if you could show some of your setup?

    OK, I figured it out.

    When I created the application, instead of editing the action hooks I copied the action hooks from the repo of the first application(the the application I created to see try out the OpenShift DIY). I think that what happened is that Git detected that the files were replaced and not edited and treated them as new files. OpenShift somehow read this, and haven’t given them the execute permissions of the original files.

    To fix this, I followed this answer to restore the old files from the OpenShift Template Builder’s commit, and now it works!

    Git Baby is a git and github fan, let's start git clone.