Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
git remote add origin

So far, so good. But:

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

git clone
git remote add origin

  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

share|improve this question
up vote 6 down vote accepted

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.

share|improve this answer
Wow, very complete and well written answer! Didn't knew about gitolite, will install it right now. Thank you. :-) – Arko Jan 23 '11 at 15:28
Well, removed gitosis and installed gitolite with your command. Was asked for user name and path. Had an issue with my keyfile named "", had to rename it "" to make it work with gl-setup. – Arko Jan 23 '11 at 21:10

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]

share|improve this answer

We have gitosis running one of our servers on Ubuntu 10.04. I created a user git specifically for the purpose you describe and it runs without any problems.

I'm not sure what the implications would be of renaming the gitosis user though…

share|improve this answer
Done it earlier, no issues server side. All went fine. But you will have to update all your remote urls client side, or reclone all your repos with the new git username. – Arko Jan 23 '11 at 21:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.