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.

  • git stash list or git show , returning ( most +s +'/---': 1: most: not found ) What is this?
  • Can't stage folder for commit with git add . or git add -u
  • git rm * doesn't remove all files in one go
  • Merging two branches where the directory structure has changed
  • Embed git-describe, date and time in a build during compilation in eclipse
  • Why is my .git file huge?
  • 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.

  • Work with merge of multiple git branches
  • tool for solving “trivial conflicts” in git
  • How to push tags with release notes to another github server?
  • Changing the Git remote 'push to' default
  • git encrypt/decrypt remote repository files while push/pull
  • How to disable git 'Push Results' dialog in eclipse
  • 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:
    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.