I'm wondering how exactly GitHub does what they do as far as hosting Git repositories goes. For example, I'm assuming that they manage repository push permissions based on values in some SQL table somewhere, something like: create table user (id int primary key auto_increment,         username varchar(255),        password varchar(255));create table repository (id int primary key auto_increment,        name varchar(255));create table repository_member(id int primary key auto_increment,        user_id int,        repository_id int);Pretty straightforward, right? I've used Gitosis (ironically hosted on GitHub) in the past, but something which uses a database would be a lot better than editing and committing changes to a couple text files on the hard drive. Is there another service which would make it easier to host tons of Git repositories and be able to heavily integrate it into  a web application like GitHub does? 
Hosting Git Repositories as per GitHub
git;github
All of them rely on ssh to authenticate the user, then something else for authorization. Gitosis and Gitolite both use a config file; Gitorious uses (I think) a database (although, it may be generating a config file anytime project permissions change; not sure).