2013-11-14 93 views
5

我第一次設置gitolite。我正在關注this instructions無法克隆存儲庫:致命:R任何gitolite管理gitolite由fallthru拒絕

當我ssh,它看起來罰款:

$ ssh -p 2222 [email protected] 
PTY allocation request failed on channel 0 
hello gitolite, this is [email protected] running gitolite3 v3.5.3.1-1-gf8776f5 on git 1.7.2.5 

R W gitolite-admin 
R W testing 
Connection to debian closed. 

但試圖克隆時,它給了我下面的錯誤:

$ git clone ssh://[email protected]:2222/home/gitolite/repositories/gitolite-admin.git 
Cloning into 'gitolite-admin'... 
FATAL: R any home/gitolite/repositories/gitolite-admin gitolite DENIED by fallthru 
(or you mis-spelled the reponame) 
fatal: The remote end hung up unexpectedly 

我試圖從亞辛@ vonneumann克隆帳戶。我將這個用戶的RSA公鑰上傳到debian服務器,將其更名爲gitolite.pub,並運行gitolite setup -pk gitolite.pub,沒有任何消息或錯誤。然後,在亞辛@ vonneumann主機我創建了一個文件在~/.ssh/config,內容如下:

host debian 
    user gitolite 
    hostname debian 
    identityfile ~/.ssh/gitolite 

(我也是在vonneumann複製id_rsagitolite

我發現this question是相似的,但答案不適合我。

任何幫助表示讚賞,謝謝。

+3

關於近距離投票:*關於通用計算硬件和軟件的問題與Stack Overflow **無關,除非它們直接涉及主要用於編程的工具***。這裏有一堆其他的git/gitolite問題。 – m0skit0

+0

只是爲了記錄(因爲我得到了同樣的錯誤,但出於不同的原因):確保你實際上**沒有**把完整的密鑰文件名放在gitolite的配置文件中,因爲你需要去掉'.pub'延期。 (這個擴展名是由gitolite自動添加的)。因此,對於'keydir/id_rsa-yasin.pub'作爲授權密鑰,在引用它時需要在'config/gitolite.conf'中使用'id_rsa-yasin'。 – Cromax

+0

@Cromax正確,但您不會獲得第一條命令中顯示的權限。 – m0skit0

回答

5

如果你有一個~/.ssh/config文件,你需要使用scp-like syntax爲你的ssh網址:

git clone debian:gitolite-admin.git 

有了一個配置,如:

host debian 
    user gitolite 
    hostname debian 
    identityfile ~/.ssh/gitolite 
    port 2222 

而且你不應該指定回購的完整路徑。

+0

謝謝,作品像一個魅力;我的SSH知識非常基礎。順便說一句,它沒有ssh://,這個前綴不起作用:'ssh:無法解析主機名:名稱或服務未知。 – m0skit0

+1

@ m0skit0對,我已經編輯了刪除'ssh://'的答案,並添加了一個鏈接到scp-like語法的另一個示例。 – VonC