Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I currently have a ubuntu server machine which has gitolite and redmine installed. Redmine accesses repository copies which are updated using a cron task. Having a cron task to pull the updates seems like an overkill is there anyway a gitolite post-commit script could execute a pull as the redmine user. My current update script looks like this:

*/15 * * * * redmine cd /home/redmine/repositories/support && git pull

The post-commit script I guess should be similar, how can I give the gitolite user the privileges to execute the pull as the redmine user?

Thanks in advance.

p.s: don't have enough reputation to create de gitolite tag.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

It looks like you have redmine set up to use a seperate repository then the one you push to. I'd suggest configuring redmine to use your 'origin' repository, rather then having a separate one that you need to deal with updating all the time.

share|improve this answer
    
Does redmine support bare repositories now? I don't use it but last I heard sometime last year it only supported non-bare repositories, and gitolite only works with bare repositories. –  Arrowmaster Feb 22 '11 at 17:43
1  
Yes, it works perfectly with bare repositories. –  devicenull Feb 23 '11 at 0:29
    
The first time I tried using the bare repositories it didn't work because the privileges weren't set correctly. –  eliocs Mar 13 '11 at 12:24

I am pretty sure you must use bare repositories with redmine (for remote repositories).

@user20520 gitolite access permissions are configured with ssh not with local permissions. If you use a remote repository you will have no issues with access controls.

share|improve this answer

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.