I found an old thread with my exact problem, but the resolution did not work for me.
I'm trying to replicate to a separate instance on the same server that gerrit is running on. The "slave" instance is running as a different user, but I have verified that I can do passwordless ssh from the user gerrit runs as to the user the slave is running as. I verified the permissions were correct on the ~/.ssh directory and the known_hosts file, HOME is set correctly, and that I disabled the ecdsa in the sshd_config file.
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:400)
at com.googlesource.gerrit.plugins.replication.PushOne.doPushAll(PushOne.java:348)
at com.googlesource.gerrit.plugins.replication.PushOne.generateUpdates(PushOne.java:341)
at com.googlesource.gerrit.plugins.replication.PushOne.pushVia(PushOne.java:290)
at com.googlesource.gerrit.plugins.replication.PushOne.runImpl(PushOne.java:244)
at com.googlesource.gerrit.plugins.replication.PushOne.runPushOperation(PushOne.java:202)
at com.googlesource.gerrit.plugins.replication.PushOne.access$000(PushOne.java:69)
at com.googlesource.gerrit.plugins.replication.PushOne$1.call(PushOne.java:181)
at com.googlesource.gerrit.plugins.replication.PushOne$1.call(PushOne.java:178)
at com.google.gerrit.server.util.RequestScopePropagator$5.call(RequestScopePropagator.java:196)
at com.google.gerrit.server.util.RequestScopePropagator$4.call(RequestScopePropagator.java:174)
at com.google.gerrit.server.git.PerThreadRequestScope$Propagator$1.call(PerThreadRequestScope.java:73)
at com.googlesource.gerrit.plugins.replication.PushOne.run(PushOne.java:178)
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:337)
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:722)
Caused by: com.jcraft.jsch.JSchException: reject HostKey: hostname
at com.jcraft.jsch.Session.checkHost(Session.java:712)
at com.jcraft.jsch.Session.connect(Session.java:313)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
... 25 more
I've tried using the hostname, localhost, user@hostname with the same result.
Running gerrit 2.5.2
I get no errors on reloading the plugin
replication config:
[remote "secondary"]
url = ssh://hostname/${name}.git
push = refs/heads/*:refs/heads/*
authGroup = Replicate
I checked the box for the group Replicate so that it's visible to all registered users, and the projects that I want replicated the group Replicate has read access to refs/*
Any pointers greatly appreciated as I feel I'm missing something obvious here.
thanks!
chanda