views:

69

answers:

1

The Players

I've been using git and gitosis for some months now, and am really loving both. Unfortunately, I have run into a problem accessing one of my projects with gitosis.

The Set-Up

I set up my git and gitosis installs on a hosted server account running Debian. I also set up four computers (two Ubuntu, two Windows) with separate rsa keys and successfully set each up to access the gitosis install. Everything worked smoothly for some time. Recently, though, I have been unable to access my 'DesktopConfiguration' project in any way (push, pull, clone). I had originally created the DesktopConfiguration project on one of my Linux machines, pushed it to the gitosis server, and cloned it on one of my Windows machines. I have had no problems accessing it until recently (the last two weeks or so). Following is my gitosis.conf file and the error message that I am receiving (the error messages are the same whether I try to push, pull, or clone using my Windows or Linux boxes):

The Hook

gitosis.conf

[gitosis]  
loglevel = DEBUG  

[group gitosis-admin]  
writable = gitosis-admin  
members = windows-desktop linux-desktop linux-laptop work-laptop  

[group main-projects]  
writable = WallpaperChanger  
writable = RegexTester  
writable = MovieAggregator  
writable = FileRenamer  
writable = GlutenFreeShoppingAssistant  
writable = Libraries  
writable = DesktopConfiguration  
writable = RssFeedReader  
members = windows-desktop linux-desktop linux-laptop work-laptop  

Error Message

C:\Documents and Settings\myname\Desktop\Desktop Config Test>git clone git@myserver:DesktopConfiguration.git  
Initialized empty Git repository in C:/Documents and Settings/myname/Desktop/Desktop Config Test/DesktopConfiguration/.git/  
DEBUG:gitosis.serve.main:Got command "git-upload-pack 'DesktopConfiguration.git'"  
DEBUG:gitosis.access.haveAccess:Access check for 'work-laptop' as 'writable' on 'DesktopConfiguration.git'...  
DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'DesktopConfiguration.git', new value 'DesktopConfiguration'  
DEBUG:gitosis.group.getMembership:found 'work-laptop' in 'main-projects'  
DEBUG:gitosis.group.getMembership:found 'work-laptop' in 'gitosis-admin'  
DEBUG:gitosis.access.haveAccess:Access check for 'work-laptop' as 'writeable' on 'DesktopConfiguration.git'...  
DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'DesktopConfiguration.git', new value 'DesktopConfiguration'  
DEBUG:gitosis.group.getMembership:found 'work-laptop' in 'main-projects'  
DEBUG:gitosis.group.getMembership:found 'work-laptop' in 'gitosis-admin'  
DEBUG:gitosis.access.haveAccess:Access check for 'work-laptop' as 'readonly' on 'DesktopConfiguration.git'...  
DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'DesktopConfiguration.git', new value 'DesktopConfiguration'  
DEBUG:gitosis.group.getMembership:found 'work-laptop' in 'main-projects'  
DEBUG:gitosis.group.getMembership:found 'work-laptop' in 'gitosis-admin'  
ERROR:gitosis.serve.main:Repository read access denied  
fatal: The remote end hung up unexpectedly  

The Tale

From my experience with gitosis and most of the questions-and-answers that I have found online, the error messages look exactly like the ones received when attempting to push to gitosis without having first added the project to a group that your machine has access to. Unfortunately, this does not appear to be true in my case. (Unless I am missing something!)

The Wire

I'm not exactly sure if this would provide some more information, but here are the debug messages from my post-update hook:

INFO:gitosis.run_hook:Running hook post-update  
DEBUG:gitosis.gitdaemon:Global default is 'deny'  
DEBUG:gitosis.gitdaemon:Walking '.', seeing ['RegexTester.git', 'gitosis-admin.git', 'Libraries.git', 'GlutenFreeShoppingAssistant.git', 'MovieAggregator.git', 'DesktopConfiguration.git', 'WallpaperChanger.git', 'RssFeedReader.git', 'FileRenamer.git']  
DEBUG:gitosis.gitdaemon:Deny 'RegexTester'  
DEBUG:gitosis.gitdaemon:Deny 'gitosis-admin'  
DEBUG:gitosis.gitdaemon:Deny 'Libraries'  
DEBUG:gitosis.gitdaemon:Deny 'GlutenFreeShoppingAssistant'  
DEBUG:gitosis.gitdaemon:Deny 'MovieAggregator'  
DEBUG:gitosis.gitdaemon:Deny 'DesktopConfiguration'  
DEBUG:gitosis.gitdaemon:Deny 'WallpaperChanger'  
DEBUG:gitosis.gitdaemon:Deny 'RssFeedReader'  
DEBUG:gitosis.gitdaemon:Deny 'FileRenamer'  
INFO:gitosis.run_hook:Done.  

The Shut-Out

I am still able to access (push, pull, clone) all of the other projects on the server (in both the gitosis-admin and main-projects groups) on all of my machines. Here are a few of the things that I have attempted so far:

  • I have checked the spelling of all of the folders, files, and configuration settings multiple times.
  • I have removed and re-added the DesktopConfiguration project from the gitosis.conf file after ensuring that the post-update hook had the proper execution permissions.
  • I added another project to gitosis after DesktopConfiguration, and it works properly.
  • I have removed and re-added my remote references to the project in git on my local machines.
  • I have removed the DesktopConfiguration.git project from my 'repositories' folder on the server and attempted to push to it again.
  • I have even re-created all of my rsa keys (although authentication does not appear to have anything to do with the issues that I am seeing).

All of these attempts have failed to allow me to access the project. As far as I am aware, nothing changed on the server or my desktop machines around the time I lost access to this project.

The Sting

I welcome any insights you may have with open arms!

+1  A: 

For 'read access denied' I'd be checking that the gitosis user on the server still had full access to the repositories. You say you're sure that nothing changed on the server, but you have ruled a lot of other things out. It can't hurt to double check.

signine
That's a good call. Unfortunately, I'm not seeing any permissions that appear to be off. Every file and directory has both read and write access for the current user. I also compared against a working project, and I'm not seeing any differences. The error does seem to put off a permissions issue vibe, though, assuming that my earlier testing is correct and the config files are valid. Are you aware of any files/folders that I should check explicitly?
AwesomeYetIronicPseudonym
At this point, the only thing I can see that's different about your config to ours then is that you have multiple 'writable =' lines, whereas we only have one.Does it still fail if you change those to a single line of: writable = WallpaperChanger RegexTester MovieAggregator FileRenamer GlutenFreeShoppingAssistant Libraries DesktopConfiguration RssFeedReader?Apologies for readability of the comment, I'm not sure how to mark this up so that the formatting is nicer.
signine