开发者

git fetch works from command line but not from the hook

I was thinking whether the question belongs here or on SO. 4 days ago I created a question from command line开发者_StackOverflow中文版 ok but the hook (git) on SO. So far no answer.

To make it quick and simple.... I want to fire 'post receive' when somebody does push to my remote repository. The hook will fetch the new stuff into another repository. Why? Redmine needs it like that so this repository is browse able.

  • when I run all necessary commands from the command line everything works.
  • when I run the same commands from the hook
    • there is no output from git when the hook executes git fetch
    • redmine tells 'The entry or revision was not found in the repository.'

I tried lots of stuff to make it work and have no idea what to do next :-)

Please read SO question for more details.


I do know exactly what and why but after git fetch executed via hook (I use gitolite) some files (maybe new ones) has permissions that redmine `doesn't like.

chmod -R 770 redmine_repo.git

did the trick

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜