Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
add comment

4 Answers

up vote 2 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 < id_rsa.pub

  3. Now you can clone to your local repo:

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

share|improve this answer
add comment

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

share|improve this answer
add comment

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
add comment

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 (id_rsa.pub) 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/id_rsa.pub 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
add comment

Your Answer

 
discard

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.