2014-05-13 133 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