Found it myself: you can specify the credentials with the git command

        git url: '[email protected]:houbie/simplegroovy.git', credentialsId: 
'jenkins_pk'




Op maandag 1 augustus 2016 14:34:01 UTC+2 schreef Ivo Houbrechts:
>
> Hi,
>
> I'm running jenkins 2.16 with the ssh-agent 1.13 plugin.
> I checkout a pipline script from git with global jenkins credentials. The 
> script then tries to checkout the whole repository:
>
> node {
>     //jenkins_pk is the ID of the same credentials used to checkout this 
> script
>     sshagent(['jenkins_pk']) {
>         git url: '[email protected]:houbie/simplegroovy.git'
>     }
> }
>
> The error I get is : Permission denied (publickey)
> I tried this with private keys with and without passphrase.
>
> I'm I missing something here?
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/3336bdb3-583f-4b15-a513-1b5d8cb642c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to