Hi, I'm trying to use sshagent plugin to copy some generated artifacts from 
the jenkins server to a remote server, however, I'm missing something on 
the setup and the build is failing with this "unkown user" error 
highlighted below

here is the code snippet from my Jenkinsfile

stage 'Deployment to batch server'
sh "chmod a+x ${workspace}/build/resources/main/deltajob.sh"

sshagent(credentials: ['deploy-batchjob']) {
sh "scp -o StrictHostKeyChecking=no ${workspace}/build/libs/*-all.jar 
deploy@batch01:/batch/producer-job/"
}

"deploy" user is a local account at batch01 remote server.


[Pipeline] stage (Deployment to batch server)
[Pipeline] sh
[develop] Running shell script
+ chmod a+x 
/var/jenkins_home/workspace/MyCompany/producer-batch-job/develop/build/resources/main/deltajob.sh
[Pipeline] sshagent
[ssh-agent] Using credentials deploy (credential to deploy batch jobs)
[ssh-agent] Looking for ssh-agent implementation...
[ssh-agent]   Java/JNR ssh-agent
[ssh-agent] Skipped registering BouncyCastle, not running on a remote agent
[ssh-agent] Started.
[Pipeline] {
[Pipeline] sh
[develop] Running shell script
+ scp -o StrictHostKeyChecking=no 
/var/jenkins_home/workspace/MyCompany/producer-batch-job/develop/build/libs/deltajob-all.jar
 
 deploy@batch01:/batch/producer-job/
*unknown user 1000060000*
[Pipeline] }
[Pipeline] // sshagent


any ideas ?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/77b1d139-a074-4593-b8f7-3a996f146388%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to