I set up a git repo with gitosis on my ubuntu 10.04 server using the following guide: http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way
It works fine and dandy, I can clone the configuration to my ubuntu 10.10 desktop computer, and commit changes there.
Thats Ok, but I do most of my actual coding on the server. So I will need to clone the configuration/gitosis-admin.git repo and the other repos locally.
git clone --local file:///home/git/repositories/gitosis-admin.git gives me: fatal: '/home/git/repositories/gitosis-admin.git' does not appear to be a git repository fatal: The remote end hung up unexpectedly
I added my server user to group git and got: fatal: failed to open '/home/git/repositories/gitosis-admin.git/objects': Permission denied
I then tried to make a public key on the server, and adding it to the keys admin repo, added the username, both as (user) and (user)@(hostname) in the configuration, to: git clone git@localhost:gitosis-admin.git or git clone git@(hostname):gitosis-admin.git both of which asks me for git@(hostname) password
When I go back to my desktop, and check out the gitosis-admin repo, the gitosis.conf lists:
[gitosis]
[group gitosis-admin]
writable gitosis-admin
members = (desktopUN)@(desktopHostname) (serverUN)@(serverHostname)
but on the server, if I root into /home/git/repositories/gitosis-admin.git/ and cat gitosis.conf, it lists
[gitosis]
[group gitosis-admin]
writable gitosis-admin
members = (desktopUN)@(desktopHostname)
I can't get my head around this, how do I set this up to get it working the way I want to. The chances are great that there is some noob coughup on my part behind all this, but I've spent 5 hours trying to get this to work now, and it takes me 2 min to set up a svn repo. So I'm getting impatient ..
Thanks
You need to either add the ssh public key of the user on server to gitosis or copy the ssh private key from the desktop to the user on the server and use it.Sorry I kinda skimmed the question at first. How did you install gitosis? I remember there being a common issue where during the install, a required hook in the gitosis-admin repo was not set to be executable. As a result it never updated the config when pushed to.
Also you should only ever access repos hosted with gitosis through SSH and not through the local filesystem, but you seem to have figured this part out already.
Additionally if you are not aware, gitosis is unmaintained and deprecated in favor of gitolite.