OpenShift action_hooks不可执行 [英] OpenShift action_hooks are not executable

查看:192
本文介绍了OpenShift action_hooks不可执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在OpenShift中创建一个测试DIY应用程序时, action_hooks 工作正常,但现在我创建了一个实际的应用程序,并且当我推送更改时它们不会触发。

我做了一些调查,发现问题 - 出于某种原因,操作挂钩不可执行。我检查了它们,它们在测试应用程序(它们工作的地方)中是可执行的 - 但现在它们不是。

chmod post-receive 钩子使它们可执行,但OpenShift上的git钩子受到保护,我无法编辑它们。



有什么办法可以解决这个问题吗?

PS。我不知道它是否有任何影响,但我的实际开发回购在Google Code上,我使用本教程将OpenShift repo设置为本地回购的上游。



当我创建应用程序时,而不是编辑动作我从第一个应用程序的回购(我创建的应用程序尝试OpenShift DIY)中复制了动作钩子。我认为发生的事情是,Git检测到文件已被替换,未被编辑并将它们视为新文件。



为了解决这个问题,我遵循这个答案,以便从OpenShift Template Builder的提交中恢复旧文件,现在它可以工作!


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.

解决方案

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!

这篇关于OpenShift action_hooks不可执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆