Gitolite via HTTP & SSH with no admin access

The issue I ran into was how to setup gitolite to work via HTTP and SSH on a server for which I have no administrative access. What this means is that I cannot change apache configuration. What follows is what made it work for me. It may not work for you. Caveat Emptor.

Assumptions

Notes

Install Gitolite for HTTP access

Ok. Take a cookie break. You deserve it.

Setup SSH access

Let’s talk briefly about SSH keys here. I’m not going to belabor the point since the documentation on this point is very good. Make sure you know what you are doing. To wit: do NOT use the same public key for the following that you use to log into the server. Since you aren’t an admin, you can lock yourself out of the server if you do. That would be bad. So, create yourself a second key pair, setup an ssh config entry that makes use of your “git” pubkey, and then use that alias in your git urls and gitolite commands from the client. This way, you can continue to log in to a shell on the server the way you always have, with your “normal” keypair.

Ok, moving on. If you don’t understand that, you probably shouldn’t be here.

Cool. Time for another cookie.