2

I was thinking whether the question belongs here or on SO. 4 days ago I created a question from command line 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.

Community
  • 1
  • 1
Radek
  • 13,813
  • 52
  • 161
  • 255
  • Should your question title say `"git fetch works from command line but not the hook"` (add the word "not")? – Dennis Williamson Nov 15 '10 at 05:47
  • to be honest ... English is not my first language and I was thinking about 'adding not'. I thought that but negates whatever is before but.... – Radek Nov 15 '10 at 21:45
  • 1
    "When I do a `git fetch`, everything but the hook works." or "everything works, except the hook". I see what you meant but Dennis is right, it would be clearer with a "not" – Tyler Nov 16 '10 at 16:39

1 Answers1

0

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

Radek
  • 13,813
  • 52
  • 161
  • 255