I am trying to set up replication to remote server (
github.mycompany.com depicted as
github.xxx.com) as per documentation but getting failure.
When I run the following command, I get this:
[sudo] password for gerrit2:
Warning: Permanently added 'github.xxx.com' (ECDSA) to the list of known hosts. ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
Permission denied (publickey).
Here is my ``replication.config`` file.
url = g...@github.xxx.com:${name}.git
push = +refs/heads/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
timeout = 5
replicationDelay = 0
The tricky part is it was able to replicate successfully earlier but mistakenly I have recreated my ssh keys on Gerrit server and from that time onwards I am facing this issue. I have also added the newly created ssh key (public key) to the
github.xxx.com 's required admin users's profile, which has the ``write`` access to that repo.
The error I am facing is:
[2016-09-21 15:24:55,291] [d711efd1] Replication to g...@github.xxx.com:yyyyyy/my-project.git started...
[2016-09-21 15:24:57,099] [d711efd1] Cannot replicate to g...@github.xxx.com:yyyyyy/my-project.git org.eclipse.jgit.errors.TransportException: g...@github.xxx.com:yyyyyy/my-project.git: Auth cancel at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:159)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:136)
...
at java.lang.Thread.run(Thread.java:745)
Caused by: com.jcraft.jsch.JSchException: Auth cancel
at com.jcraft.jsch.Session.connect(Session.java:511)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
How can i overcome this error. Should I set up a password somewhere for authentication? Please help.