did you try to debug that scp command locally with some -v flags?

On Friday, 14 October 2016 22:52:15 UTC+1, Mario Rodriguez wrote:
>
> 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/c92cc6a4-1969-466b-a147-30d17c8dd87d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to