Ubuntu-server: gitosis user naming convention

If you install gitosis on ubuntu-server 10.10 via apt-get:

sudo apt-get install gitosis

The post-install script will create a new gitosisuser.

This user will be used to allow people to connect with SSH using public keys. That is, without requiring each user to have their own account on your server:

git clone [email protected]:project.git
git remote add origin [email protected]:project.git

So far, so good. But:

I have seen many times and I personally prefer to use the gitusername for that:

git clone [email protected]:project.git
git remote add origin [email protected]:project.git

  1. Is there any reason we use gitosis instead of simply git on ubuntu-server?
  2. Should I avoid renaming the gitosis user to git with: sudo usermod -l git gitosis

Any idea welcome


The gitosis username is just a default, likely selected to not conflict if you already had a git user.

The gitosis package in Debian asks what username and directory you want to use, although they might be low priority questions and not asked by default, it should be the same way in Ubuntu. You can run the command sudo dpkg-reconfigure gitosis to reconfigure the package and prompt you for the username and directory to use. The package most likely will not rename the existing user though. If you do that yourself then reconfigure it, any potential issues should be avoided if the package is upgraded, otherwise it will just create a new gitosis user. If you don't rename the user but reconfigure the package and select a new username but keep the same directory without removing its contents first, it will likely cause issues.

As an aside though I want to point out that gitosis has been deprecated in the git community and replaced by gitolite which does basically the same thing but is better in every way. I just checked the Debian package for gitolite, which is also available in Ubuntu 10.10, and it uses gitolite as the default username and /var/lib/gitolite as the default directory. It does however ask for the username and directory to use but they are low priority questions and not asked by default. To install gitolite and be asked all the questions you can use sudo DEBIAN_PRIORITY=low aptitude install gitolite.


I would recommend using Gitolite instead of Gitosis since it isn't supported anymore. Here is a guide on how to setup Gitolite: How to install and setup a Git Repository Server using Gitolite on Linux Ubuntu 10.04 & 11.04 [Development Environment]