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.