Re: [Fuego] Unable to connect gerrit server from within docker container via Gerrit Trigger plugin

Dhinakar Kalyanasundaram <[email protected]>
Newsgroups dev.linux.lists.fuego
Message-ID <20191104100817epcms5p24aef0982f6f950bb3e05380e3a37ea5e@epcms5p2>
Hi Tim,




Any idea about this issue?


Generally speaking, how to do authentication via ssh key for Jenkins running inside the container from an external server such as Gerrit.


The issue is the Gerrit server is looking for Jenkins user and '/var/lib/jenkins/.ssh/id_rsa.pub' path in the Linux host but they are actually available inside the container.




Regards,


Dhinakar








--------- Original Message ---------


Sender : Dhinakar Kalyanasundaram <[email protected]> Staff Engineer/FDS SW /SSIR/Samsung Electronics


Date : 2019-10-31 19:59 (GMT+5:30)


Title : Unable to connect gerrit server from within docker container via Gerrit Trigger plugin




Dear Fuego Users,




I am trying to connect to gerrit server by installing and configuring the 'gerrit plugin' but I get 'Permission denied (publickey) issue.


The issue is only from within the docker, from my Linux host I am able to connect.




Then I tried from within the container, as jenkins user, as shown below.




jenkins@linux-2030047407:~$ ssh -p 29418 [email protected]
Permission denied (publickey).



I have added the public key of Jenkins user '/var/lib/jenkins/.ssh/id_rsa.pub' in my gerrit server.


OpenSSHServer was not installed by default in the container (Debian stretch), so I installed it and also configured '/etc/ssh/sshd_config' file.


(Set PermitRootLogin, PubkeyAuthentication PasswordAuthentication to yes).


But still I am not able to connect to 'gerrit server' from within docker container.


Any tips to solve this issue will be highly appreciated.




Thanks in advance.




Note:


FYI, In the Jenkins->Gerrit Trigger plugin configuration, under 'Gerrit Connection Settting' I get the following error, when I try 'Test Connection'.


Connection error : com.jcraft.jsch.JSchException: Auth fail




Regards,


Dhinakar
(unnamed) (image/gif, 13.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.