2017-06-05 50 views
1

安裝gitolite後在GCP計算引擎故障,在gitolite-admin/keydir/charley_rsa.pub增加了一個新的SSH公共密鑰和增加對charley一個新的回購協議:SSH克隆在gitolite在GCP計算引擎

conf/gitolite.conf

repo test 
    RW+  = charley 

然後:在GCP本地控制檯中輸入git clone gitolite-admin即可。

當我們在偏遠的本地PC做git clone,它顯示錯誤「由fallthru被拒絕」

git clone ssh://[email protected]/test 
Cloning into 'test'... 
FATAL: R any test charley_rsa DENIED by fallthru 
(or you mis-spelled the reponame) 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

(克隆testing (@all)在偏遠地方PC是確定)

回答

0

你添加新鍵的方法是首先克隆gitolite_admin回購,修改並回推:觸發重新編譯~/.gitolite/配置文件。

如果您直接在服務器上做任何事情,然後按照「administering gitolite directly on the server

你至少需要

gitolite compile; gitolite trigger POST_COMPILE 
+0

是新的密鑰加入到gitolite。它直接在GCP服務器中完成,因爲我克隆了gitolite-admin並在GCP服務器控制檯中編輯gitolite.conf。 – yaocl

+0

@yaocl是的,所以我的答案站:仔細按照http://gitolite.com/gitolite/odds-and-ends/#administering-gitolite-directly-on-the-server – VonC

+0

我敢肯定,gitolite的安裝過程是確定的因爲我已經在本地docker實例中測試了安裝。 – yaocl

1

最後,更新公共密鑰文件名

我使用後的問題得以解決id:charley在conf文件中:gitolite.conf

repo test 
    RW+  = charley 

從「charley_rsa.pub」到「charley.pub」變化的SSH密鑰文件名 後

ssh -i ~/.ssh/id_rsa [email protected] info 
hello charley, this is [email protected] running gitolite3 v3.6.6-13-g8bde76d on git 1.8.3.1 

R W gitolite-admin 
R W test 
R W testing