📎 Webclip
HowTo: Easily integrate a (SSH secured) GIT repository into Redmine
This how-to shows how to connect a Git repository to a Redmine project and keep it up to date. It assumes SSH access to the repository, a local directory for the clone, and a Redmine installation that can find the Git binaries.
Reading notes#
- The repository should be cloned as a mirror, not as a bare repository, because Redmine only needs the commit information.
- The example uses the Redmine owner user
redmine, a local path under/var/lib/redmine/repos/, and a remote repository atgit@...:my_repo. - After cloning, the repository must be added in Redmine under administration or project settings, with type set to GIT and the absolute local path filled in.
- Opening the repository dialog makes Redmine fetch changesets between the local repository and the Redmine database, which can take a long time for large repositories.
- Opening that dialog does not fetch new commits from Git itself, so Redmine will not show fresh commits unless the local repository is updated separately.
- To keep the repository current, the text recommends a cron job for the Redmine user that runs
git fetch --allevery five minutes. - If several repositories are cloned, each one needs its own crontab entry.
