I am using gerrit for code review and I use, replication plugin to keep the repo in sync with github.com .
But, the replication is not working. It throws me error:
[2014-01-16 11:23:04,694] ERROR com.googlesource.gerrit.plugins.replication.ReplicationQueue : Cannot replicate to git@github.com:visitvinoth/gerrit_prj_1.git
org.eclipse.jgit.errors.TransportException: git@github.com:visitvinoth/gerrit_prj_1.git: reject HostKey: github.com
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:142)
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:468)
at com.googlesource.gerrit.plugins.replication.PushOne.doPushAll(PushOne.java:416)
at com.googlesource.gerrit.plugins.replication.PushOne.generateUpdates(PushOne.java:409)
at com.googlesource.gerrit.plugins.replication.PushOne.pushVia(PushOne.java:357)
at com.googlesource.gerrit.plugins.replication.PushOne.runImpl(PushOne.java:340)
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$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:360)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: com.jcraft.jsch.JSchException: reject HostKey: github.com
at com.jcraft.jsch.Session.checkHost(Session.java:780)
at com.jcraft.jsch.Session.connect(Session.java:342)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
... 25 more
I have already registered the RSA key of the gerrit user in github.com on my account.
When I try triggering the replicate command manually,
ssh -p 29412 vinoth@xxx.xxx.xx.xx gerrit replicate gerrit_prj_1
I get the error,
gerrit: replicate: not found
Please help