2 Gitalist - A modern git web viewer
5 perl script/gitalist_server.pl --repo_dir /home/me/code/git
8 As Gitalist follows the usual Perl module format the usual approach for
9 installation should work, e.g.:
20 You can also check Gitalist out from its git repository and run it, in
21 this case you'll additionally need the author modules, but no
22 configuration will be needed as it will default to looking for
23 repositories the directory above the checkout.
26 Gitalist is a web frontend for git repositories based on <gitweb.cgi>
27 and backed by Catalyst.
30 This project started off as an attempt to port *gitweb.cgi* to a
31 Catalyst app in a piecemeal fashion. As it turns out, thanks largely to
32 Florian Ragwitz's earlier effort, it was easier to use *gitweb.cgi* as a
33 template for building a new Catalyst application.
36 You can install Gitalist from CPAN in the usual way:
40 Alternatively, you can get Gitalist using git.
42 The canonical repository for the master branch is:
44 git://git.shadowcat.co.uk/catagits/Gitalist.git
46 Gitalist is also mirrored to GitHub at
47 <https://github.com/broquaint/Gitalist>, and a number of people have
48 active forks with branches and/or new features in the master branch.
51 As of 0.002001 Gitalist can now be bootstrapped to run out of its own
52 directory by installing its prerequisites locally with the help of
53 local::lib. So instead of installing the prerequisites to the system
54 path with CPAN they are installed under the Gitalist directory.
56 To do this clone Gitalist from the Shadowcat repository mentioned above
57 or grab a snapshot from broquaint's GitHub repository:
59 https://github.com/broquaint/Gitalist/downloads
61 With the source acquired and unpacked run the following from within the
64 perl script/bootstrap.pl
66 This will install the necessary modules for the build process which in
67 turn installs the prerequisites locally.
69 NB: The relevant bootstrap scripts aren't available in the CPAN dist as
70 the bootstrap scripts should not be installed.
73 Gitalist is configured using Catalyst::Plugin::Configloader. The
74 supplied sample configuration is in Config::General format, however it
75 is possible to configure Gitalist using other config file formats (such
76 as YAML) if you prefer.
78 WHEN CHECKING GITALIST OUT OF GIT
79 Gitalist from git includes a minimal "gitalist_local.conf", which sets
80 the repository directory to one directory higher than the Gitalist
83 This means that if you check Gitalist out next to your other git
84 checkouts, then starting the demo server needs no parameters at all:
86 Gitalist [master]$ perl script/gitalist_server.pl
87 You can connect to your server at http://localhost:3000
90 Gitalist can be supplied with a config file by setting the
91 "GITALIST_CONFIG" environment variable to point to a configuration file.
93 If you install Gitalist from CPAN, a default configuration is installed
94 along with gitalist, which is complete except for a repository
95 directory. You can get a copy of this configuration by running:
97 cp `perl -Ilib -MGitalist -e'print Gitalist->path_to("gitalist.conf")'` gitalist.conf
99 You can then edit this configuration, adding a "repo_dir" path and
100 customising other settings as desired.
102 You can then start the Gitalist demo server by setting
103 "GITALIST_CONFIG". For example:
105 GITALIST_CONFIG=/usr/local/etc/gitalist.conf gitalist_server.pl
107 Alternatively, if you only want to set a repository directory and are
108 otherwise happy with the default configuration, then you can set the
109 "GITALIST_REPO_DIR" environment variable, or pass the "--repo_dir" flag
110 to any of the scripts.
112 GITALIST_REPO_DIR=/home/myuser/code/git gitalist_server.pl
113 gitalist_server.pl --repo_dir home/myuser/code/git
115 The "GITALIST_REPO_DIR" environment variable will override the
116 repository directory set in configuration, and will itself be overridden
117 by he "--repo_dir" flag.
120 Once you have followed the instructions above to install and configure
121 Gitalist, you may want to run it in a more production facing environment
122 than using the single threaded developement server.
124 The recommended deployment method for Gitalist is FastCGI, although
125 Gitalist can also be run under <mod_perl> or as pure Perl with
126 Catalyst::Engine::PreFork.
128 Assuming that you have installed Gitalist's dependencies into a
129 local::lib, and you are running from a git checkout, adding a trivial
130 FCGI script as "script/gitalist.fcgi" (this file is specifically in
131 ".gitignore" so you can have your own copy):
134 exec /home/t0m/public_html/Gitalist/script/gitalist_fastcgi.pl
136 This example can be seen live here:
138 http://example.gitalist.com
141 The Gitalist config is loaded with Catalyst::Plugin::ConfigLoader and
142 the available config options are:
144 Model::CollectionOfRepos
145 git Path to the "git" binary.
148 A directory containing the directories to show.
150 If no repositories are found in this directory then Gitalist will
151 search recursively in that directory for repositories.
154 A boolean indicating whether to always search recursively for
155 repositories within "repo_dir".
158 Path a file containing a list of repositories that can be shown.
159 Each line in the file will represent the name of a repo to show e.g
164 This is compatible with "gitweb"'s "projects.list".
167 If provided every must contain a file of the same name to be
168 visible. This is similar to "gitweb"'s functionality.
171 log The number of commits to show in the
174 Running Gitalist in FastCGI mode requires a webserver with FastCGI
175 support (such as apache with <mod_fcgi> or <mod_fcgid>). Below is a
176 sample configuration using Apache2 with mod_fcgid in a dynamic
177 configuration (as opposed to static or standalone mode). More
178 information on these modes and their configuration can be found at
179 "Standalone server mode" in Catalyst::Engine::FastCGI.
181 In Apache's mime.conf, add "AddHandler fcgid-script .fcgi" (or
182 "AddHandler fastcgi-script .fcgi" for mod_fcgi).
184 And a quick VirtualHost configuration:
187 ServerName gitalist.yourdomain.com
188 DocumentRoot /path/to/gitalist.fcgi
189 <Directory "/path/to/gitalist.fcgi">
191 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
196 # Tell Apache this is a FastCGI application
197 <Files gitalist.fcgi>
198 #change the below to fastcgi-script if using mod_fcgi
199 SetHandler fcgid-script
203 Now to access your Gitalist instance, you'll go to
204 "gitalist.yourdomain.com/gitalist.fcgi/" (do not forget that trailing
205 "/"). If you'd like a different URL, of course, you'll likely want to
206 use <mod_rewrite> or equivalent.
208 If you find the need to do some troubleshooting, you can call
209 "http://url_to_gitalist.fcgi?dump_info=1" and/or add export
210 "GITALIST_DEBUG=1" to the top of your gitalist.fcgi file (just below the
213 Also, note that Apache will refuse %2F in Gitalist URLs unless
214 configured otherwise. Make sure "AllowEncodedSlashes On" is in your
215 httpd.conf file in order for this to run smoothly.
218 Patches are welcome, please feel free to fork on github and send pull
219 requests, send patches from git format-patch to the bug tracker, or host
220 your own copy of gitalist somewhere and ask us to pull from it.
223 Gitalist has an active irc community in "#gitalist" on irc.perl.org,
224 please feel free to stop by and ask questions, report bugs or
225 installation issues or generally for a chat about where we plan to go
229 Gitalist::Controller::Root
231 Gitalist::Git::Repository
235 AUTHORS AND COPYRIGHT
236 Catalyst application:
237 © 2009 Venda Ltd and Dan Brook <broq@cpan.org>
238 © 2009, Tom Doran <bobtfish@bobtfish.net>
239 © 2009, Zac Stevens <zts@cryptocracy.com>
241 Original gitweb.cgi from which this was derived:
242 © 2005-2006, Kay Sievers <kay.sievers@vrfy.org>
243 © 2005, Christian Gierke
245 Model based on http://github.com/rafl/gitweb
246 © 2008, Florian Ragwitz
249 Licensed under GNU GPL v2