3 % how to setup gitolite to use smart http mode
7 **Note**: "smart http" refers to the feature that came with git 1.6.6, late
8 2009 or so. The base documentation for this is `man git-http-backend`. Do
9 **NOT** read `Documentation/howto/setup-git-server-over-http.txt` and think
10 that is the same or even relevant -- that is from 2006 and is quite different
11 (and arguably obsolete).
13 # WARNINGS and important notes
15 * Please read [authentication versus authorisation][auth] first, and make
16 sure you understand what is gitolite's responsibility and what isn't.
18 * I have tested this only on stock Fedora (whatever is the current version);
23 * Apache 2.x and git installed.
24 * Httpd runs under the "apache" userid; adjust instructions below if not.
25 * Similarly for "/var/www" and other file names/locations.
29 @@box-r(Note that the `GIT_PROJECT_ROOT` variable (see "man git-http-backend")
30 is no longer optional. Make sure you set it to some place outside apache's
33 In place of detailed instructions, there is a script called
34 `t/smart-http.root-setup`. **Do NOT run this script as is -- it is actually
35 meant for my testing setup and deletes stuff**. However, it does provide an
36 excellent (and working!) narration of what you need to do to install gitolite
39 Make a copy of the script, go through it carefully, (possibly removing lines
40 that delete files etc.), change values per your system, and only then run it.
42 # allowing unauthenticated access
44 If you want users to see repos without performing any HTTP authentication, you
45 should first decide what repos they should have unauthenticated access to:
47 repo foo bar baz # or maybe '@all'?
50 Then in the rc file (`~/.gitolite.rc`), in the section marked "rc variables
51 used by various features", add this (including the trailing comma):
53 HTTP_ANON_USER => 'nobody',
55 # Making repositories available to both ssh and http mode clients
57 This section has been contributed by Thomas Hager (duke at sigsegv dot at),
58 and is available [here][ssh-and-http].
64 Git URLs look like `http://user:password@server/git/reponame.git`.
66 The custom commands, like "info", "expand" should be handled as follows. The
67 command name will come just after the `/git/`, followed by a `?`, followed by
68 the arguments, with `+` representing a space. Here are some examples:
71 curl http://user:password@server/git/info
72 # ssh git@server info repopatt
73 curl http://user:password@server/git/info?repopatt
74 # ssh git@server info repopatt user1 user2
75 curl http://user:password@server/git/info?repopatt+user1+user2
77 With a few nice shell aliases, you won't even notice the horrible convolutions
78 here ;-) See t/smart-http for a couple of useful ones.
82 The 'gitolite' command (for example, 'gitolite compile', 'gitolite query-rc',
83 and so on) *can* be run on the server, but it's not straightforward. Assuming
84 you installed exactly as given in this page, you should
86 * get a shell by using, say, `su -s /bin/bash - apache`
87 * run `export HOME=$HOME/gitolite-home`
88 * run `export PATH=$PATH:$HOME/bin`
90 and *then* you can run `gitolite <subcommand>`