tags:

views:

707

answers:

5

Hi,

I've set up gitosis using the tutorial privided at:

http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way

I found that I was unable to push and create a new repository after adding the appropriate permissions in the gitosis.conf. I would continually get "read access Denied" error. I ended up checking the actual repository on the server which contained my updated gitosis.conf file. However when I checked the '.gitosis.conf' file located in the home folder of the gitosis user, I found that it was not updated. Once I replaced the contents of this file with the one in the repository I was able to create and use the new repository with no problems.

Does anyone know what could be causing this? I know that gitosis uses a post-update hook to update the server appropriately, so I think the problem most likely resides around that.

Thanks in advance! Bryan

A: 

when I checked the '.gitosis.conf' file located in the home folder of the gitosis user, I found that it was not updated.

That's really weird -- on my gitosis installation, the .gitosis.conf in the "gitosis" user's home directory is a symlink. You might want to check that; perhaps gitosis thinks the repository is somewhere other than where you think it is?

Also, adding a section to your conf file like this:

[gitosis]
loglevel = DEBUG

can help you figure out a lot of problems with gitosis.

ebneter
+2  A: 

Check the permissions on the post-update hook in the repository. It must be executable, and the published version of gitosis doesn't ensure that.

Novelocrat
Thanks for your reply....that was exactly the problem I had.
Bryan
A: 

Hi,

I'm having the same problem.

I'm running a CentOS server where I compiled and installed git from source, using the latest sources (version 1.6.5). On my local machine I'm running version 1.6.4.4.

I followed various tutorials for getting gitosis up and running and ended up with a weird problem: gitosis.conf doesn't seem to get updated on the server.

On the server I see

lrwxrwxrwx 1 git git 57 Oct 12 22:13 .gitosis.conf -> /home/scm/git/repositories/gitosis-admin.git/gitosis.conf

Its content shows there were no modifications made, although I already cloned the gitosis-admin repository, made changes, committed and pushed (without error messages).

Even after pushing, gitosis.conf is not updated (at least the instance pointed at by the symlink).

So I tried to verify if pushing worked at all. I deleted my local gitosis-admin copy and cloned again. My newly cloned repository has all the changes. WTF?!

Does anybody have a clue as to what's going on?

regards,

Tobias W.

Tobias W.
Tobias, did you check that gitosis has proper permissions to execute the post-update hook inside the repository? ... That's what solved my problem.
Bryan
A: 

I found this problem on Ubuntu 9.04. When I looked into it, I found that the post-update hook pointed to /usr/share/python-support/gitosis/gitosis-0.2-py2.5.egg/gitosis/templates/admin/hooks/post-update which no longer existed. I'm sure it came through some updated package.

I looked around on the filesystem and found that if I pointed hooks/post-update to /usr/share/python-support/gitosis/gitosis/templates/admin/hooks/post-update it worked just fine.

JT
A: 

I tried to cover with commons error for Gitosis installation and setup

http://jerabi.com/sdionne/blog/2010/09/06/git-repository-server-gitosis-on-win7-troubleshooting/

I hope that can help you