kubitron / redmine_git_hosting

A ChiliProject/Redmine plugin which makes configuring your own git hosting easy.
78 stars 15 forks source link

Automatic Mirror Updates #49

Closed jchnkl closed 12 years ago

jchnkl commented 12 years ago

Hi,

I have a repository where I've added a github repo as remote mirror. Pushing manually using the "Push" button in "Settings" works.

Did I miss something for automatic pushing?

How could I figure out what the problem is?

Thanks,

jrk

kubitron commented 12 years ago

Hello. If things are configured correctly, the mirror should automatically update when you push changes to the gitolite repository.

If that is not working, then there may be something wrong with the git hooks. Some questions: (1) Is gitolite running on the machine as redmine? If not, that is problematic. (2) Since the Redmine hook runs as a git user and is written in ruby, does the git user have access to ruby? If not, the hook will not run.

jchnkl commented 12 years ago

Hello,

thanks for your reply.

I looked at my repositories and they belong all to "git:git" whereas redmine (ruby) runs as "www-data:www-data". However, I have this entry in my /etc/sudoers file:

www-data        ALL=(git)       NOPASSWD:ALL
git             ALL=(www-data)  NOPASSWD:ALL

I could try running gitolite as www-data, but I have to figure that out first (it's quite a while since I put my fingers on this).

Can I enable debugging mode somehow?

jchnkl commented 12 years ago

Hi, me again :)

Seems like I figured it out.

-rw------- 1 git git 2771 Jan 29 20:25 /var/repos/git/.gitolite/hooks/common/post-receive

As you can the permissions are not correct. Using chmod 755 fixed it.

-rwxr-xr-x 1 git git 2771 Jan 29 20:25 /var/repos/git/.gitolite/hooks/common/post-receive

Automatic pushes are working now.

kubitron commented 12 years ago

Glad to hear that you figured this out.

I'm going to close the issue.