2014-05-13 132 views
1

我想讓gerrit的github複製工作。我可以直接使用git clone [email protected]:jpgrace/gerrit-test.git來克隆一個空的存儲庫,但是每當我嘗試使用gerrit來複制任何東西時,某些東西就會失敗。如果我通過ssh或Web應用程序運行復制命令,則無關緊要。我得到在etc/error_log中Gerrit無法複製git存儲庫

同樣的錯誤。如果我直接運行復制,

$ ssh -p 29418 [email protected] gerrit replication start 

這是控制檯輸出:

gerrit: replication: not found 

與此寫入error_log中:

[2014-05-12 18:47:30,785] ERROR com.googlesource.gerrit.plugins.replication.ReplicationQueue : Cannot replicate to [email protected]:jpgrace/All-Projects.git 
org.eclipse.jgit.errors.TransportException: [email protected]:jpgrace/All-Projects.git: unknown host 
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:139) 
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121) 
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248) 
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147) 
at com.googlesource.gerrit.plugins.replication.PushOne.listRemote(PushOne.java:483) 
at com.googlesource.gerrit.plugins.replication.PushOne.doPushAll(PushOne.java:427) 
at com.googlesource.gerrit.plugins.replication.PushOne.generateUpdates(PushOne.java:420) 
at com.googlesource.gerrit.plugins.replication.PushOne.pushVia(PushOne.java:368) 
at com.googlesource.gerrit.plugins.replication.PushOne.runImpl(PushOne.java:351) 
at com.googlesource.gerrit.plugins.replication.PushOne.runPushOperation(PushOne.java:267) 
at com.googlesource.gerrit.plugins.replication.PushOne.access$000(PushOne.java:78) 
at com.googlesource.gerrit.plugins.replication.PushOne$1.call(PushOne.java:240) 
at com.googlesource.gerrit.plugins.replication.PushOne$1.call(PushOne.java:237) 
at com.google.gerrit.server.util.RequestScopePropagator$5.call(RequestScopePropagator.java:222) 
at com.google.gerrit.server.util.RequestScopePropagator$4.call(RequestScopePropagator.java:201) 
at com.google.gerrit.server.git.PerThreadRequestScope$Propagator$1.call(PerThreadRequestScope.java:75) 
at com.googlesource.gerrit.plugins.replication.PushOne.run(PushOne.java:237) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 
at java.util.concurrent.FutureTask.run(FutureTask.java:166) 
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165) 
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266) 
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:364) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
at java.lang.Thread.run(Thread.java:701) 

最初我以爲有些東西與我的ssh配置不對,或者我沒有在下運行gerrit gerrit用戶。其中一個我不明白的地方是警告中的「未知主機」部分。

這裏是我的〜/ .ssh/config中

Host github.com 
User git 
IdentityFile /opt/gerrit/.ssh/id_rsa 
StrictHostKeyChecking no 
UserKnownHostsFile /opt/gerrit/.ssh/known_hosts 

這裏是relavent輸出 「的ps aux | grep的格里特」

gerrit 2546 1.7 35.4 1138240 177464 pts/2 Sl 17:45 0:53 GerritCodeReview -jar /opt/gerrit/bin/gerrit.war daemon -d /opt/gerrit --run-id=1399931125.2524 

這裏是我的replication.config:

[remote "github"] 
url = [email protected]:/${name}.git 

我錯過了什麼?

回答

1

我發現上面的錯誤消息的問題。我replication.config指着:

github 

不是:

github.com