I'm having issues trying to get an agent to authenticate using the SSH Agent plugin on a R2.4 z/OS USS agent with a Docker Jenkins controller. The goal is to convince GitSCM to actually fetch properly. We get SSH authentication errors no matter what happens. This is using Pipelines.
I've tried
sshagent (credentials: ['mvs-randall']) {
checkout([$class: 'GitSCM',
branches: [[name: '*/development']],
extensions: [
[$class: 'CleanBeforeCheckout'],
[$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true,
recursiveSubmodules: true, reference: '', trackingSubmodules: false]],
doGenerateSubmoduleConfigurations: false, submoduleCfg: [],
userRemoteConfigs: [[url: 'g...@xx.xxx.xxx.xxx:proj/repo.git'']]])
}
and
checkout([$class: 'GitSCM',
branches: [[name: '*/development']],
extensions: [
[$class: 'CleanBeforeCheckout'],
[$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true,
recursiveSubmodules: true, reference: '', trackingSubmodules: false]],
doGenerateSubmoduleConfigurations: false, submoduleCfg: [],
userRemoteConfigs: [[credentialsId: 'mvs-randall',url: 'g...@xx.xxx.xxx.xxx:proj/repo.git']]])
Both result in Permission denied (publickey).
I've done the same thing on many other platforms with no problem. This seems very R2.4 specific. There was a change in the supported file encodings as well - we used to use -Dfile.encoding=utf8 in the agent config (because this is an IBM that likes EBCDIC), but had to move to -Dfile.encoding=ISO8859-1 and everything seems messed up now. IBM had this funky script they recommend that massages the key into an IBM-1047 encoding but that does not help at all - in fact the GitSCM agent cannot process any results if that script is used.
Help!
TIA,
Randall