Project

General

Profile

Actions

Patch #2173

open

Update the Git repository automatically

Added by David Holm about 16 years ago. Updated over 11 years ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
SCM extra
Target version:
-
Start date:
2008-11-13
Due date:
2013-04-01 (over 11 years late)
% Done:

0%

Estimated time:

Description

The Wiki suggests (http://www.redmine.org/wiki/redmine/RedmineRepositories) that you should set up a cron job to update the Git bare repository, the one redmine points to, automatically. This is unneccessary since you could just as easily use Git's hooking mechanism to have it automatically update the repo on each push.

1. chmod a+x post-receive-redmine
2. Put post-receive-redmine in <redmine dir>/doc/git-hooks
3. Change into your main git repo dir (the one you push to)
4. Edit ./hooks/post-receive and add a line that says ". <redmine dir>/doc/git-hooks/post-receive-redmine"
5. Run "git config --add hooks.redmineGitBase <base path to redmine bare repos, i.e. /var/lib/redmine/git_repos>"
6. You're done!

The script could be updated to create the bare repo if it doesn't already exist but it would need to know which permissions to change it to for redmine to read it so I didn't add this feature.


Files

post-receive-redmine (387 Bytes) post-receive-redmine post-receive-redmine David Holm, 2008-11-13 09:03
post-receive-redmine (383 Bytes) post-receive-redmine post-receive-redmine David Holm, 2008-11-13 11:19
post-receive-redmine_v2 (416 Bytes) post-receive-redmine_v2 Radomir Mladenovic, 2009-03-25 19:33
post-receive-redmine_v3 (1.63 KB) post-receive-redmine_v3 L Philbrook, 2010-02-04 02:26
post-receive-redmine_v3 (1.87 KB) post-receive-redmine_v3 L Philbrook, 2010-02-04 03:25

Related issues

Related to Redmine - Feature #1454: Support repository syncing for new repository importsNew2008-06-15

Actions
Actions

Also available in: Atom PDF