Making a gitosis repository available to Redmine
Added by Thomas Skardal over 15 years ago
Hi!
I've got a git repository created with gitosis located at /home/git/repositories/project. This git repository is located at the same server as Redmine. It is of my understanding that I have to make a clone for Redmine in order to connect them. I'm currently trying to do this by using a post-receive hook, but I can't figure out how to do it. It seems to me that several others have done this, but I can't quite find out how.
My post-receive script:
echo "doing a git pull on clone" cd /var/redmine-git/project git pull cd /var/www/redmine echo "updating redmine" ruby script/runner "Repository.fetch_changesets" -e production
The problem now, is that I don't know if the script is correct. To get this work I have to add the "git" user and ssh-key to gitosis. Also, /var/redmine-git/project needs to be accessible to both "git" and "www-data".
If anyone have done something similar, I would be happy to know what to do, and how :)