Reputation: 1716
I followed the tutorial at http://blog.agdunn.net/?p=277 to setup git and gitosis.
I can clone the gitosis-admin repo edit it and push it to the server. When I look at the files on the server they are the same as my local copies so everything is good there.
The problem comes when I try to create my own repo. In the gitosis.conf file I added the following
[group exampleproject]
writable = myproject
members = ian
Then I did the following on my local machine to create a repo
mkdir myproject
cd myproject
I then created a readme file and commited my changes
git add .
git commit -m 'My first commit of readme file'
Then I added a remote
git remote add myserver git@server_name:/var/git/repositories/myproject.git
Then when I try to push using the following
git push myserver master:refs/heads/master
I get the error messages
fatal: '/var/git/repositories/myproject.git': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly
Can anyone see what I am doing wrong?
Thanks
Upvotes: 2
Views: 1428
Reputation: 1326872
Regarding your gitosis command, I suspect you don't need to have the full path for the remote reference for a repo:
In other words, don't:
git remote add myserver git@server_name:/var/git/repositories/myproject.git
But do:
git remote add myserver git@server_name:myproject.git
The gitosis script will pick up the name of the project and will add the path to the root directory which stores all gitosis-managed repository.
The same would apply for a gitolite setup, but with many more features ;)
Upvotes: 2