Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Looking for setup steps for gitosis after installing from apt-get.

share|improve this question
up vote 3 down vote accepted
  1. apt-get install gitosis

    a. The gitosis repo directory is: /srv/gitosis

    b. The gitosis user is auto created and named: gitosis

  2. Init gitosis with your public key:

    sudo -H -u git gitosis-init <

  3. Now you can clone to your local repo:

    git clone gitosis@[SERVER]:gitosis-admin.git

share|improve this answer

If I remember correctly, Progit has an excellent chapter on that one.

share|improve this answer

I suggest looking into this page. It gives clear instructions about how to do the setup for Debian based (like ubuntu) systems.

First you create a new repository, then you check that out using the git client. This check out can be used to configure the server. But that is all very nicely explained on that page.

Good luck!

share|improve this answer

Ok, so apt-get install gitosis should have created a new user on your system called "gitosis". Gitosis works by creating an admin repository in this users home folder, and to administrate git you clone that repository, make the changes you want and then push the changes back to the original repo.

To make gitosis create the admin repo, you probably need to create an ssh key pair and tell gitosis to use it for user authentication. Try ssh-keygen -t rsa to create the key pair and copy the public part ( to a folder on the server that the gitosis user has read access to (/tmp should work). After that you can run sudo -H -u gitosis gitosis-init < /tmp/ to make gitosis initialize the admin repository.

When the admin repository has been created, you use the private part of the previously generated ssh (most probably called "id_rsa") key pair to authenticate your git client when cloning the admin repo. To clone the admin repo, the following command can be used git clone git@[servername]:gitosis-admin.git.

Now you can add the public keys for anybody that is supposed to have access to the git repositories to the admin repository.

share|improve this answer

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.