10

I have one desktop PC running Ubuntu 11.04 and one Netbook running Debian 6.0.1a. I have installed and configured git as described here, on my desktop PC.

I am also learning Symfony and have setup a repository for the Jobeet project on my PC. Now, when I try to clone the repository from Debian on my Netbook, I get this error:

ERROR:gitosis.serve.main:Repository read access denied

I have setup ssh and can easily connect to the Ubuntu from Debian with ssh.

Contents of my gitosis.conf:

[gitosis]


[group symfony]
writable = jobeet
members = ako@ako-ubuntu-11 ako@debian

[group team]
writable = testproject
members = ako@ako-ubuntu-11 ako@debian

[group gitosis-admin]
members = ako@ako-ubuntu-11 ako@debian
writable = gitosis-admin

I have copied the id_rsa.pub file (public key of the Debian user) to the keydir directory too, and pushed back to the gitosis repo.

I am able to clone the repository from Ubuntu machine, so I think it has something to do with the permissions and/or ssh.

Any help is greatly appreciated.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
Omid Kamangar
  • 5,768
  • 9
  • 40
  • 69

3 Answers3

7

First I would use gitolite instead. Gitosis is no longer actively developed.

Check that you need to name the public key to your user name that appears in the config. Your public key that you commit should be renamed to jobeet.pub.

Hope this helps.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
4

I got the same error while I was trying push new repository. It was caused by missing rights on /var/git/repositories/gitosis-admin.git/hooks/post-update

sudo chmod a+x /var/git/repositories/gitosis-admin.git/hooks/post-update
hrach
  • 2,443
  • 2
  • 26
  • 37
  • 1
    Unfortunately didn't resolve it in my case. Still the same error :( – Ain Tohvri Feb 19 '12 at 18:21
  • I had a similar problem; the post-update was a link pointing to an obsolete version in python2.6 instead of python2.7. Resolved by changing the post-update link and fixing the permissions. Same basic question: http://stackoverflow.com/questions/1474515/gitosis-not-updating-server-configuration-after-push-of-configuration-changes – rfay Mar 16 '13 at 22:17
2

This frequently gets (1, 2, 3, and myself) resolved by re-generating the ssh keypair

ssh-keygen -t rsa

and adding it at the redmine account settings.