Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

post-receive:

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
add comment

1 Answer

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: http://www.redmine.org/wiki/1/HowTo_keep_in_sync_your_git_repository_for_redmine.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.