Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a redmine server and a gitolite server on the same machine. I want Redmine's GIT repository to get updated when a commit is registered. I thought of adding a post-receive script that updates the repository:


cd home/redmine/repositories/repo
git pull

this doesn't work because the script is run by the gitolite user instead of the redmine user owner of the repository cloned folder. How can I change the user that executes the script inside a batch script?, is there a cleaner way of updating the repository?

thanks in advance.

share|improve this question
don't have enough rank to add the gitolite tag which could be suitable for this question. – eliocs Dec 31 '10 at 0:20
up vote 0 down vote accepted

In the end I used a cron task to update the repository every 5 minutes. details can be found here:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .