
Host Your Own Private Git Repos - deafcalculus
http://www.sagargv.com/blog/host-your-own-private-git-repos/
======
wahern
It's worth pointing out that you can host a public, read-only Git repository
over HTTP _without_ running any special software or permitting anonymous SSH.
All you do is clone a bare Git repository into a directory that is publicly
readable via your preferred HTTP daemon and run `git --bare update-server-
info`. Et voila. It doesn't provide a fancy web GUI[1], but it does allow
people to clone, and at the end of the day that's all you need for publishing
your work to serious contributors.

For me this was the killer feature for transitioning to Git from SVN for my
personal projects early on in the distributed SCM wars. I've been hosting my
own services for over 15 years, and not having to manage niche daemons is
extremely important to me from a time and security perspective. The only
additional code I need to keep in mind is a simple post-receive hook that
synchronizes a master Git repository to the public HTTP mirror on the same
host, because I don't want my master repositories accessible within the HTTP
daemon's chroot'd environment. I just hardlink that hook into any new
repository I create.

Theoretically one could write a pure browser Git viewer and then the puzzle
would be complete. The Git HTTP protocol doesn't utilize "index.html", so you
can drop the JavaScript viewer into the same directory as the bare Git
repository. Currently I put a simple HTML page at index.html telling people
know that the directory is for cloning via a Git client (sometimes along with
a link to the non-canonical Github mirror so people can view the code online).

