2011-01-13 58 views
2

我剛剛建立一個gitosis服務器。一切順利。我已經能夠在我的筆記本電腦上克隆gitosis-admin項目,配置gitconf,添加用戶並推送所有內容。推出一個新的回購Gitosis

但是,當我嘗試推送新的存儲庫時,出現訪問錯誤。我嘗試了一切,到處尋找,我一​​直無法解決這個問題!

git init 
git remote add origin [email protected]_SERVER_HOSTNAME:proj.git 
git push origin master 
ERROR:gitosis.serve.main:Repository read access denied 
fatal: The remote end hung up unexpectedly 

我讀過,我可以從未來的/home/git/.ssh的authorized_keys但文件不存在。

有人知道我該如何解決這個問題嗎? 格雷格

[編輯] 我gitosis.conf的

[gitosis] 

[group gitosis-admin] 
writable = gitosis-admin 
members = [email protected] greg 

[group proj] 
writable = proj 
members = [email protected] greg 

這是我在倉庫

[email protected]:/home/git/repositories$ ls -l 
total 4 
drwxr-x--- 8 git git 4096 2011-01-13 18:58 gitosis-admin.git 

Outup形式的日誌:

git clone [email protected]:flatfolio.git 
Initialized empty Git repository in /private/tmp/flatfolio/.git/ 
DEBUG:gitosis.serve.main:Got command "git-upload-pack 'flatfolio.git'" 
DEBUG:gitosis.access.haveAccess:Access check for 'greg' as 'writable' on 'flatfolio.git'... 
DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'flatfolio.git', new value 'flatfolio' 
DEBUG:gitosis.group.getMembership:found 'greg' in 'gitosis-admin' 
DEBUG:gitosis.group.getMembership:found 'greg' in 'flatfolio' 
DEBUG:gitosis.access.haveAccess:Access ok for 'greg' as 'writable' on 'flatfolio' 
DEBUG:gitosis.access.haveAccess:Using prefix 'repositories' for 'flatfolio' 
DEBUG:gitosis.serve.main:Serving git-upload-pack 'repositories/flatfolio.git' 
warning: You appear to have cloned an empty repository. 

這工作得很好。 但是,當我把它失敗:■

git push origin master:refs/heads/master 
DEBUG:gitosis.serve.main:Got command "git-receive-pack 'flatfolio.git'" 
DEBUG:gitosis.access.haveAccess:Access check for 'greg' as 'writable' on 'flatfolio.git'... 
DEBUG:gitosis.access.haveAccess:Stripping .git suffix from 'flatfolio.git', new value 'flatfolio' 
DEBUG:gitosis.group.getMembership:found 'greg' in 'gitosis-admin' 
DEBUG:gitosis.group.getMembership:found 'greg' in 'flatfolio' 
DEBUG:gitosis.access.haveAccess:Access ok for 'greg' as 'writable' on 'flatfolio' 
DEBUG:gitosis.access.haveAccess:Using prefix 'repositories' for 'flatfolio' 
DEBUG:gitosis.serve.main:Serving git-receive-pack 'repositories/flatfolio.git' 
error: src refspec master does not match any. 
error: failed to push some refs to '[email protected]:flatfolio.git' 
+0

您是否在本地存儲庫中提交了任何內容?它看起來不像你在這裏有什麼。 – ebneter 2011-01-14 08:33:18

+0

我忘了粘貼它,但我確實推了一些東西 – Gregory 2011-01-15 09:29:22

回答

0

如果你成功地使Gitosis的管理員,然後你的公鑰效果很好。

看來我使用git clone [email protected]_SERVER_HOSTNAME:proj.git克隆一個空的存儲庫,所以不需要先初始化它。

0

嘗試克隆/獲取/推這個網址:

git clone [email protected]:flatfolio.git 

,但你在哪裏定義的呢?

它應該閱讀:

[group flatfolio] 
writable = flatfolio 
members = [email protected] greg