A while ago I upgraded from Gitosis to Gitolite. I’ve been using Gitosis for a long time and while there is nothing wrong with Gitosis, Gitolite just does so much more.
One of my favorite features is wildcard repositories which makes it super easy to have normal users create as many repositories as they can imaging without having to bother a git-admin.
To setup a sandbox for each user you must first enable wildcard repositories in ~/.gitolite.rc. You do this by setting $GL_WILDREPOS to 1.
After that you just need to configure the userspace like this1:
1 2 3 4 | |
Note the use of CREATOR, this is a variable signifying the user that creates and accesses the repository. The CREATOR can even delegate permissions2 to other users if needed.
To get you locally created repository up on the new upstream you first add the new remote and then you just push it up.
For convenience you can also make you local repository track the new upstream using git branch --set-upstream3 which will save you a lot of key strokes4 in the long run.
1 2 3 | |
That’s it! - Hope you enjoy wildcard repositories as much as I do.