Svn – Hosting multiple repositories (svn, hg, git)

githostingmercurialsvn

I've recently acquired a dedicated server, and need to move several repositories to it from a source control hosting service. Having not much experience in server administration however I have no clue how to effectively organize it. What I seek —

  1. svn.host.com, hg.host.com, git.host.com subdomains that will be roots to the different repos, via SSH keys
  2. easy creation of new repositories
  3. authentication using the server unix user list, but with permissions on a per-project basis, also optional read-only public access for some of the repos

Unfortunately any search term I try on Google directs me to commercial hosted solutions, and not guides on how to roll up my own. I need something like a stripped down hosted solution but without the need of having users be able to create their own repos.

Any suggestions, tutorials or scripted solutions on where to start research? A open source solution for an administrative interface for handling that (or at least for some would be perfect…

Best Answer

I only use Git, so I wil try at least to help you with that:

If you do not see any trouble administrating your repos via the command line, gitosis should do the trick pretty nicely.

If you do really need a web interface, you could take a look at repo.or.cz (http://repo.or.cz/w/girocco.git) or gitorious (http://gitorious.org/gitorious). Repo.or.cz is uglier, but it is way easier to install (gitorious is open-source, but it is also the software powering gitorious.org - they do not have much incentive to write nice instructions)

Here is a more comprehensive list of options: https://git.wiki.kernel.org/index.php/GitHosting

Anyone of those options will give you easy creation of new repositories.

Now, one word of caution: you should never, EVER, use the unix server user list for repository permissions. It is easy enough to mess with, and results are easily catastrophic (gitosis uses a simple file configuration, and ssh keys. Should do the trick for you).

Another thing, I don't see why you need to have subversion, HG and Git repositories. Most projects use only one of those options. Care to elaborate why?