Gitosis错误:在以前可访问的存储库上接收“读访问被拒绝”

玩家们

我已经使用git和gitosis几个月了,我真的很喜欢这两个.不幸的是,我遇到了使用gitosis访问我的一个项目的问题.

设置

我将git和gitosis安装在运行Debian的托管服务器帐户上.我还设置了四台计算机(两台Ubuntu,两台Windows),并配有单独的rsa密钥,并成功地将其设置为访问gitosis安装.一切顺利进行了一段时间.最近,尽管如此,我无法以任何方式访问我的“DesktopConfiguration”项目(推,拉,克隆).我最初在我的一台Linux机器上创建了DesktopConfiguration项目,将其推送到gitosis服务器,并将其克隆在我的一台Windows机器上.直到最近(最近两周左右),我没有访问任何问题.以下是我的gitosis.conf文件和我正在收到的错误消息(错误消息是一样的,无论我尝试推,拉或克隆使用我的Windows或Linux框):

钩子

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  

错误信息

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  

故事

根据我的gitosis经验和我在网上找到的大部分问题和答案,错误消息看起来与尝试推送gitosis时收到的错误消息没有首先将项目添加到您的计算机可访问的组中.不幸的是,在我的情况下,这似乎并非如此. (除非我错过了一些东西!)

电线

我不知道这是否会提供更多的信息,但这里是我的更新后的挂钩的调试消息:

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.  

关闭

我仍然能够访问(推,拉,克隆)我所有机器上服务器上的所有其他项目(在gitosis-admin和主项目组中).以下是我迄今为止尝试过的一些事情:

>我已经检查了所有文件夹,文件和配置设置的拼写多次.
>在确保后更新挂钩具有正确的执行权限之后,我已经从gitosis.conf文件中删除并重新添加了DesktopConfiguration项目.
>我在DesktopConfiguration之后添加了另一个项目到gitosis,它正常工作.
>我已经删除并重新添加我的本地机器上git的项目的远程引用.
>我已经从我的服务器上的“repository”文件夹中删除了DesktopConfiguration.git项目,并尝试重新推送它.
>我甚至重新创建了我所有的rsa密钥(尽管身份验证与我看到的问题似乎没有任何关系).

所有这些尝试都无法让我访问该项目.据我所知,在我无法访问此项目的时候,服务器或台式机上没有任何变化.

我欢迎您有任何见解您可能拥有张开双臂!

最佳答案
对于“读取访问被拒绝”,我将检查服务器上的gitosis用户仍然可以完全访问存储库.你说你确定在服务器上没有任何变化,但是你已经排除了很多其他的事情.双重检查不能伤害.

转载注明原文:Gitosis错误:在以前可访问的存储库上接收“读访问被拒绝” - 代码日志