You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.mkd
+36-22
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ to provide Git Smart HTTP access. Git repositories are automatically created wh
6
6
Redmine. There is also an option to automatically create a git repository for a project, when the project is created.
7
7
Caching functionality is also implemented to speed page-load times for viewing git repositories.
8
8
9
+
Release Notes are available off the wiki: https://github.com/kubitron/redmine_git_hosting/wiki/Release-Notes.
10
+
9
11
## Compatibility
10
12
11
13
The current version of this plugin is not compatible with all versions of Redmine and ChiliProject. As of this writing, it
@@ -23,11 +25,9 @@ problems that prevent administrative access (the plugin will exploit **gl-admin-
23
25
## Configuration Strategy
24
26
25
27
One major problem when configuring ChiliProject/Redmine + Git is how the git repositories are accessed,
26
-
and in particular setting permissions properly.
27
-
This plugin solves this problem by allowing the web server/rails user to run git via sudo.
28
-
A previous version of this plugin (see ssh branch) requires the configuration of git to run through ssh,
29
-
but using sudo to allow the web server user to run commands as the git user is much faster.
30
-
To configure your sudoers file to allow your web server user to run commands as git, and your git user
28
+
and in particular setting permissions properly. This plugin solves this problem by allowing the web server/rails user to run git via sudo. A previous
29
+
version of this plugin (see ssh branch) requires the configuration of git to run through ssh, but using sudo to allow the web server user to run commands
30
+
as the git user is much faster. To configure your sudoers file to allow your web server user to run commands as git, and your git user
31
31
to run commands as the web server user add these two lines to your sudoers file (run visudo to edit this file):
32
32
33
33
www-data ALL=(git) NOPASSWD:ALL
@@ -59,18 +59,28 @@ gitolite installation) is particularly useful for a web-hosting scenario with in
59
59
60
60
## Step-By-Step configuration instructions
61
61
62
-
**(1)** Install gitolite. The details of gitolite installation are beyond the scope of these instructions, and
63
-
there are plenty of guides elsewhere on how to do this. For the purposes of this tutorial, we will assume
64
-
that gitolite has been installed for user "git", and you have an ssh key called "git\_gitolite\_admin\_id\_rsa"
65
-
(and corresponding public key) for which access to the gitolite-admin repository has been granted. The ssh
66
-
key should not have a password set. *It is very important that this ssh key be unique and not used for anything
67
-
other than administrative access, i.e. should not be used by any user as their access key.*
68
-
69
-
If possible, use gitolite version >= 2.0.3, so that the plugin will be able to recover from a
70
-
variety of failures that mess up administrative access to the gitolite repository (the plugin will utilize **gl-admin-push**
62
+
**(1)** Install gitolite. If possible, use gitolite version >= 2.0.3, so that the plugin will be able to
63
+
recover from a variety of failures that mess up administrative access to the gitolite repository (the plugin will utilize **gl-admin-push**
71
64
to fixup admin access in these circumstances). Note that the plugin will work with earlier versions of gitolite; however,
72
65
it will not be able to recover from as many faults (it will attempt to use **gl-setup** which doesn't work quite as well).
73
66
67
+
The fine details of gitolite configuration are beyond the scope of these instructions, and there are plenty of guides elsewhere on configuration
68
+
options. The following provides a simple (working) configuration. We will assume that gitolite has been installed for user "git" (adjust accordingly
69
+
if gitolite has been installed with some other username). Generate an
70
+
administrator key and initialize the gitolite repository in the following fashion as root:
71
+
72
+
su git
73
+
ssh-keygen -N "" -f ~/.ssh/id_rsa
74
+
gl-setup ~/.ssh/id_rsa.pub
75
+
76
+
Simply take any defaults offered by gl-setup (i.e. quit out of offered edit of the configuration file without making any changes). These commands
77
+
will generate a new key in the .ssh directory of the "git" user, and use this key as the gitolite administrative key during the
78
+
initialization of the gitolite repository.
79
+
80
+
You may choose to generate your administrative key in another way. However you generate your key, it is important that this key not have a passphrase
81
+
set. *Further, it is very important that this ssh key be unique and not used for anything other than administrative access, i.e. should not be used by
82
+
any user as their access key.*
83
+
74
84
**(2)** If you want to enable anonymous access to your repositories via the git:// protocol you will need to
75
85
install the git-daemon. The details of this are beyond the scope of the tutorial as well (and again there
76
86
are lots of available guides out there). This step is optional -- if you don't want to enable anonymous
@@ -89,17 +99,21 @@ lines below the original directive:
89
99
Defaults:git !requiretty
90
100
Defaults:www-data !requiretty
91
101
102
+
*Note: with at least some versions of Ubuntu, you must place any additions to the sudoers file at the end, otherwise the line starting with "admin ..." ends up
103
+
negating these additions -- probably to your great frustration.*
104
+
92
105
93
106
**(4)** In the root of your Redmine/ChiliProject rails directory -- the Redmine/ChiliProject root, not the plugin
94
-
root, and not the public directory -- create a directory called .ssh, and copy the "gitolite_admin_id_rsa"
95
-
private key and the "gitolite_admin_id_rsa.pub" files from step one into this directory. Then change the
96
-
owner of these files to www-data and the permissions to 600 for the private key and 644 for the public key:
107
+
root, and not the public directory -- create a directory called .ssh, and copy your gitolite administrative public/private
108
+
key pair into this directory using "gitolite_admin_id_rsa" as the base name. Then change the owner of these files to www-data and
109
+
the permissions to 600 for the private key and 644 for the public key. Assuming that you followed the key-generation step from (1) above,
110
+
these instructions translate to performing the following as root:
0 commit comments