Gitosis错误:在先前可访问的存储库上接收到“读取访问被拒绝” [英] Gitosis Error: Receiving 'Read Access Denied' on previously accessible repository
问题描述
玩家
我已经使用git和gitosis好几个月了,而且我真的很喜欢这两者。不幸的是,我遇到了使用gitosis访问我的一个项目的问题。
设置
我在运行Debian的托管服务器帐户上设置了我的git和gitosis安装。我还使用单独的rsa密钥设置了四台计算机(两个Ubuntu,两个Windows),并成功设置每台计算机以访问gitosis安装。一切工作顺利一段时间。不过,最近我一直无法以任何方式访问我的'DesktopConfiguration'项目(推,拉,克隆)。我最初在我的一台Linux机器上创建了DesktopConfiguration项目,将它推送到gitosis服务器,并将其克隆到我的一台Windows机器上。直到最近(最近两周左右),我都没有遇到任何问题。以下是我的gitosis.conf文件和我收到的错误消息(错误消息是相同的,无论我尝试推,拉,还是使用我的Windows或Linux盒克隆):
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 =库
writable = DesktopConfiguration
writable = RssFeedReader
members = windows-desktop linux-desktop linux-laptop work-laptop
错误信息
C:\ Documents and Settings \ myname\Desktop\桌面配置测试> git克隆g it @ myserver:DesktopConfiguration.git
在C:/ Documents and Settings / myname / Desktop / Desktop配置测试/ DesktopConfiguration / .git /
中初始化的空Git存储库DEBUG:gitosis.serve.main:Got命令git-upload-pack'DesktopConfiguration.git'
DEBUG:gitosis.access.haveAccess:在'DesktopConfiguration.git'中检查'work-laptop'是否为'可写入'...
DEBUG :gitosis.access.haveAccess:从'DesktopConfiguration.git'剥离.git后缀,新值'DesktopConfiguration'
DEBUG:gitosis.group.getMembership:在'main-projects'中找到'work-laptop'
DEBUG:gitosis.group.getMembership:在'gitosis-admin'中找到'work-laptop'
DEBUG:gitosis.access.haveAccess:在'DesktopConfiguration.git'上检查'work-laptop'为'writeable' '...
DEBUG:gitosis.access.haveAccess:从'DesktopConfiguration.git'剥离.git后缀,新值'DesktopConfiguration'
DEBUG:gitosis.group.getMemb ership:在'main-projects'中找到'work-laptop'
DEBUG:gitosis.group.getMembership:在'gitosis-admin'中找到'work-laptop'
DEBUG:gitosis.access.haveAccess:在'DesktopConfiguration.git'上检查'work-laptop'是'readonly'...
DEBUG:gitosis.access.haveAccess:从'DesktopConfiguration.git'剥离.git后缀,新值'DesktopConfiguration'
DEBUG:gitosis.group.getMembership:在'main-projects'中找到'work-laptop'
DEBUG:gitosis.group.getMembership:在'gitosis-admin'中找到'work-laptop'
错误:gitosis.serve.main:存储库读取访问被拒绝
致命:远程端意外挂起
故事
根据我对gitosis和我在网上找到的大多数问题和答案的经验,错误消息看起来与接收到的完全一样当试图推动gitosis没有首先添加项目到一个组你的机器可以访问。不幸的是,在我看来,这似乎并不正确。 (除非我错过了什么!)
线
我不确定这是否会提供一些更多的信息,但这里是来自我的更新后的钩子的调试消息:
INFO:gitosis.run_hook:Running hook post -update
DEBUG:gitosis.gitdaemon:全局默认为'deny'
DEBUG:gitosis.gitdaemon:散步'。',看到['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:拒绝'MovieAggregator'
DEBUG:gitosis.gitdaemon:拒绝'DesktopConfiguration'
DEBUG:gitosis.gitdaemon:Deny'WallpaperChanger'
DEBUG:gitosis.gitdaemon:Deny'RssFeedReader'
DEBUG:gitosis.gitdaemon:Deny'FileRenamer'
INFO:gitosis.run_hook:完成。
关闭
我是仍然能够在我的所有机器上访问(推,拉,克隆)服务器上的所有其他项目(包括gitosis-admin和主项目组)。以下是我迄今尝试过的一些内容:
所有这些尝试都未能让我访问该项目。据我所知,在我无法访问此项目时,服务器或台式机上没有任何变化。
刺客
我欢迎任何您张开双臂的见解!
对于'拒绝读取访问',我会检查服务器上的gitosis用户仍然可以完全访问存储库。你说你确定服务器上没有任何变化,但你已经排除了很多其他的事情。它不能伤害双重检查。
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!
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.
这篇关于Gitosis错误:在先前可访问的存储库上接收到“读取访问被拒绝”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!