davidb dives in   Archives

hosting your own git repositories

Github is all the rage, but what if you don’t want to store your code up in the sky? No, you want to host it yourself. Or, more likely, you have to host it yourself, because you work for some giant corporation who doesn’t believe in letting their coders store their stuff in the unclean world.

So. What are your options?

Let’s back up a little. Why do you need to host git repositories at all? What sorts of things should a hosting solution give you? First of all, if you want to actually work with other people, and those other people use, um, different computers, it is quite convenient to have a central repository around to use as a conduit. Also, if you want to be able to push changes anywhere, a central hosted git repository is a not-very-confusing place to do so.

Generally hosting solutions range from just providing push and clone access to a bare git repository somewhere, to bundling repository browsers, bug trackers, wikis, graphs, ugh. The top end of the hosting solutions integrates everything you need to run a successful software project, the bottom end solutions do the bare minimum, letting other apps handle the metaphorical heavy lifting. Unless you are the only one going to use the hosted repositories, your hosting solution likely has to deal with account management (i.e., letting other folks get accounts, upload keys, etc.), and likely it will have to make trivial the task of adding new repositories to the service. Some other things that it is useful to know:

And back to the main business at hand: your hosting options. This list is non-exhaustive, but it should get you headed in the right direction.

The high end:

The low end:

Or, just give everyone an account on a machine and tell them the path to the bare git repositories. Or you could use a combination of straight ssh and gitosis/gitolite. With the “low end” solutions, you’d typically want to set up repository browsing (at least). Fortunately, git comes with a reasonable one, gitweb. However, there are others: cgit, Trac, and FishEye, to name a few.

Written on Sep 28, 2010.

comments powered by Disqus