The following PHP-based frontends for git were found from looking at the "official" list of git web interfaces. Evaluations were superficial and subjective, by looking at specs, demos (where available), project history. GitList and Indefero have been installed and tested as well.

Requirements were:

  • Written in PHP.
  • Features for viewing git repos on the web and downloading files and zipballs / tarballs.
  • Features for repository-based access control, both for accessing the web interface of that repository and the git repository itself (via git:// or http:// protocol).
  • Free & open source software.
  • In active development (non-maintained projects are a potential security risk).
  • Nice to have: Debian / Ubuntu packages. Good for comfortable updating, and in some sense, this is also security relevant … we're all a bit lazy and might postpone updates that take more time than running apt-get upgrade.

Results by adequacy, best first: (all projects listed here are free software)

  1. Indefero. Very nice tool, and at least somewhat in active development. Selected here because it is the only PHP based, lightweight solution that allows to have per-repository access rights on the web interface out of the box. Also managing these access rights is sufficiently comfortable (without double effort for git itself and the web interface), as both can be done through the web interface [source]. Might be too heavyweight for those who look for just a small repository viewer, as this has also issue tracking, SVN / Mercurial / hg / monoton support and more.
  2. GitList. In active development as of 2013-01. Clean looking code structure. Clean interface (using Twitter Bootstrap). This is however just a sweet repository viewer at the moment, without a way to restrict or manage access rights view the web interface. You can add that with .htaccess Basic HTTP authentication or other mechanisms (see this starting point). But it seems this will always need a double effort: managing access rights for the git client on the command line, and additionally for GitList. The only exception would be Basic HTTP authentication for both, but getting that to work for git when you also want to use it for push operations is difficult, and it also required a .netrc configuration file for all clients [instructions]. See also the installation instructions by Kulbir Saini.
  3. GitPHP. In active development. Simple interface that aligned to the original Perl based Gitweb tool included with git. Demo site available.
  4. pgkiss. A very simple, small minimalist PHP web interface for git. In active development. When needing access control, you have to use HTTP Basic authentication in Apache, or similar measures.
  5. git-php. Seems to be no longer in active development.
  6. ViewGit. The web interface looks similar to that of GitPHP (and a bit nicer, for my taste). However, this tool seems to be no longer in active development. Demo site available.

Note that, from an end user's perspective, GitLab plus gitolite would be the nicest way to go: it looks nice and has very powerful features. But the combo is a mix of Ruby (for GitLab) and Perl (for gitolite), and quite difficult to configure.

Now for one more interesting git web application, which is not a repo browser a class of its own:

git-webcommit. A web-based interface to make git commits. It is not specilalized for viewing and downloading repositories (though it also allows to display files and diffs of changed files). But its main task is on the other end: you get a web interface to stage files and commit these changes (compare the screenshot). git-webcommit will internally call the commandline git tools (which means easy installation and guaranteed compatibility for the user), but it provides a form-based web interface rather than a command-based one. Finally, it's written in PHP. I've not yet tried the tool for myself, but if I ever need a self-hosted alternative to GitHub Gist, I will consider it.

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>