HowTo simply keep Redmine in sync with GitHub » History » Version 1

Anonymous, 2011-10-15 12:56

1 1 Anonymous
h1. HowTo keep simply in sync Redmine with GitHub
2 1 Anonymous
3 1 Anonymous
There are a lot of means out there, here is the simplest one I have found out :
4 1 Anonymous
5 1 Anonymous
1. Install the GitHub Hook plugin
6 1 Anonymous
http://www.redmine.org/plugins/redmine_github_hook, it works with Redmine 1.2.1 too
7 1 Anonymous
8 1 Anonymous
2. In Redmine, go in Administration/Settings and click on the Repository tab
9 1 Anonymous
* Enable Git as SCM.
10 1 Anonymous
* Select "auto-fetch commits"
11 1 Anonymous
* Click on "Enable WS for repository management", generate an API key and copy it, we'll need it in a few minutes.
12 1 Anonymous
* Click "Save".
13 1 Anonymous
14 1 Anonymous
3. Now, you have to create a local repository on the machine Redmine is installed
15 1 Anonymous
* Use specifically the command git clone --mirror [repo_url].
16 1 Anonymous
* Pay attention to the fact that Redmine needs read rights on this folder.
17 1 Anonymous
* Go then in your projects settings, in the "repository tab". Select "Git" as SCM, and fill the +absolute+ path to the local repository you created just above.
18 1 Anonymous
19 1 Anonymous
4. Finally go to GitHub
20 1 Anonymous
* Select your repository and click on "Admin".
21 1 Anonymous
* Click on the "Service Hooks" tab and select Redmine in the list.
22 1 Anonymous
* Scroll up to fill needed information, don't forget the API Key we generated earlier. For instance, if your project url is http://redmine.mydomain.com/projects/my_project :
23 1 Anonymous
> Adress = http://redmine.mydomain.com
24 1 Anonymous
25 1 Anonymous
> Project = my_project
26 1 Anonymous
27 1 Anonymous
> API Key = the API key we got from Redmine
28 1 Anonymous
29 1 Anonymous
* Click "Update Settings" and your are done !