2011-09-20 102 views
1

我一直在敲我的頭靠在了一段牆現在,並沒有在我附近的人知道的比我在這一點上做的。安裝的Git倉庫 - SSH問題

我的辦公室裏,他們要使用一箇中央的Git倉庫實驗室箱 - 主要用於測試各種事情。當然,他們還希望我能夠獲得一些設置git的經驗,以便我們稍後可以設置其他git實例。

我運行Windows 7與OEL 5.7 VM,與箱體運行OEL 5.5。從我的虛擬機,我SSH進入實驗室,並開始修補。在安裝git和gitosis之後,我設法讓本地實例工作。我可以看到git存儲庫很好,如果我嘗試在本地克隆它,它就像夢一樣。但是,如果我嘗試從我的虛擬機,它要麼A.)通過SSH踢我了fatal: 'testproject.git' does not appear to be a git repository或B)踢我出Permission denied (publickey,gssapi-with-mic),這取決於我如何調用飯桶。

例子:我配置我創建(本地測試)如下訪問測試項目:

[group team] 
writable = testproject 
members = [email protected] cwerness [email protected] [email protected] 

這是我第一次的經驗建立一個Git倉庫,所以我想包括我的關於基地遠程用戶。因此,成員部分的冗餘。

當我嘗試用我的用戶名來克隆倉庫而已,我得到

[[email protected] Desktop]$ git clone [email protected]:testproject.git 
Cloning into testproject... 
Enter passphrase for key '/home/cwerness/.ssh/id_rsa': 
fatal: 'testproject.git' does not appear to be a git repository 
fatal: The remote end hung up unexpectedly 

但是,如果我嘗試用更多的信息,克隆庫,我得到

[[email protected] Desktop]$ git clone "[email protected]"@10.1.1.10:testproject.git 
Cloning into testproject... 
Permission denied (publickey,gssapi-with-mic). 
fatal: The remote end hung up unexpectedly 

我有存儲在/ keydir文件夾中的所有公鑰。該存儲庫已創建並由用戶oracle擁有,並且我已在上述克隆命令中嘗試了該用戶及其域的所有排列,因此無效。此外,我想再次建立的〜/ .ssh/config文件這樣

Host labbox 
    Hostname 10.1.1.10 
    User cwerness 
    IdentityFile /home/cwerness/.ssh/id_rsa 

,我嘗試了所有不同的方式進行連接,從兩個用戶。沒有任何東西給我比我已有的更多信息。

盒設置爲驗證通過公共密鑰SSH連接,工作正常。我可以通過SSH登錄到cwerness,沒有任何問題。

這越來越成爲一個巨大的頭痛對我來說,我想,如果有人可以告訴我究竟是如何,我太傻了,如果沒有辦法解決這個問題。

+0

嘗試:git clone git://[email protected]:testporoject.git –

+0

gitosis很久以前被gitolite所取代 – knittl

+0

git //完全不起作用,並且存儲庫存在於/ home/oracle/repositories中/ – CWerness

回答

2

git clone [email protected]:testproject.git將在用戶cwerness的主目錄中顯示,但您聲明您將存儲庫置於/home/oracle/repositories中。試試git clone [email protected]:/home/oracle/repositories/testproject.git