Modify Jenkins OpenSSH Key Format for Gerrit 10/62510/2
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Thu, 5 Dec 2019 14:47:07 +0000 (06:47 -0800)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Thu, 5 Dec 2019 14:55:11 +0000 (06:55 -0800)
commita8f90e343fdee6ca9927096c5af68af33c75c89b
tree531d0e5fbea6e9e3f0c67ea375233ddc07be7a6b
parent9096bc568bc7ac18672aff087020b3a630b79543
Modify Jenkins OpenSSH Key Format for Gerrit

Newer versions of openssh generate private keys in an 'openssh' format
(see man 1 ssh-keygen: -o option), and not the classic PEM format.

The PEM format is needed by the SSH library Jenkins uses (JSch) in order
to read the private key from disk for the Gerrit plugin.

This fixes the error seen from the logs:

  IOException:
      com.jcraft.jsch.JSchException: invalid privatekey

Note: This was not changed in the Ansible task for generating user SSH
keys, as there does not appear to be a way to specify the key format.

Change-Id: I978f59b25f0ae17f56e03e898f896971c4c4b424
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
init/playbooks/tasks/jenkins.yaml