Administrating your own git server
I recently started renting a virtual private server. I have a few experiments in mind (experimenting with Hadoop is a big one), but there are also a few necessities, e.g. my Shiny Server for developing webapps in R.
Another big use is having a private git server. When I develop for companies, I obviously don’t want the code to be public, which is a requirement for the free GitHub accounts.
Setting up this server is easy. I followed the instructions from the wonderful Pro Git book, conveniently available for free online. This site walks you through the one-time setup of a git server. In this article, I collect the commands for setting up a new repository on an existing server, for future references.
Create a new repository
ssh on your server as the
git user, and execute:
This sets up a new bare repository.
Then, on your local machine:
Adding other users
The following post explains how to add a collaborator to your own server: