0

I'm following the instructions at Ubuntu Git Community Documentation

Success fully installed the git-core and gitosis packages on the server A

A# sudo apt-get -y install git-core gitosis A# gitosis user's password is gitflux 

Initialized gitosis with

A# sudo -H -u gitosis gitosis-init < ~/keys/git-dsa-public2.key 

Now checkout the gitosis-admin branch on local machine

B$ git clone gitosis@A:repositories/gitosis-admin.git 

Tried to add a new project to the repository by editing the gitosis.conf

[gitosis] [group team] writable = sweepshots members = git_id_rsa [group gitosis-admin] writable = gitosis-admin members = git_id_rsa 

and commit it back to the server. [there was no errors, but I'm not sure this worked correctly]

A#cat /srv/gitosis/repositories/gitosis-admin.git/gitosis.conf

is now showing

[gitosis] [group team] writable = sweepshots members = git_id_rsa [group gitosis-admin] writable = gitosis-admin members = git_id_rsa 

Committing to the first project

 C$ mkdir sweepshots C$ cd sweepshots C$ git init C$ touch a_text_file.txt C$ git add . C$ git commit -a -m "Initial import" C$ git remote add origin gitosis@A:sweepshots.git 

(also tried git remote add origin gitosis@A:repositories/sweepshots.git)

 C$ git push origin master 

Here I'm getting the error

fatal: 'sweepshots.git' does not appear to be a git repository fatal: The remote end hung up unexpectedly 

Am I missing anything ?

-- UPDATE here is the directory listing at server A

root@testserver:~# cd /srv/gitosis/ root@testserver:/srv/gitosis# ls git gitosis repositories root@testserver:/srv/gitosis# ls gitosis projects.list root@testserver:/srv/gitosis# ls repositories/ gitosis-admin.git root@testserver:/srv/gitosis# ls git gitosis-admin.git root@testserver:/srv/gitosis# 
4
  • 1
    I guess you have to create a repository on the server first. Commented Apr 21, 2011 at 9:17
  • @ZeissS am i missing that? like how? Commented Apr 21, 2011 at 9:19
  • Can you confirm that the repository exists in the repositories directory? Commented Apr 21, 2011 at 9:25
  • @Ikke please see the update in the question Commented Apr 21, 2011 at 9:38

2 Answers 2

1

you don't have a sweepshots.git repository on your server, so there is no repository git can push to. you have to create one first:

su gitosis # make sure the repository has the correct permissions mkdir /srv/gitosis/sweepshots.git cd /srv/gitosis/sweepshots.git git init --bare 
Sign up to request clarification or add additional context in comments.

1 Comment

or just git init --bare /srv/gitosis/sweepshots.git
1

It looks like you might need a repo section as shown on this webpage: http://www.mantisbt.org/wiki/doku.php/mantisbt:gitosis_management#adding_a_new_repository.

[repo sweepshots] description = My sweepshots project. owner = John Smith [group sweepshots] writable = sweepshots members = git_id_rsa 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.