I'm trying to configure my Jenkinsfile to run in one which already have access to my git repository via ssh. When the Jenkinsfile in the repo rootpath is executed, the jenkins job fails:
Permission denied (publickey)
It seems that the git clone of the repo is being executed with Jenkins user and not with user that have right access in this node, so, is there any way to specify in Jenkinsfile which public key file must be used by the job? This is current Jenkinsfile:
pipeline {
agent {
node {
label 'node-example'
customWorkspace '/Users/node-example/dev'
}
}
stages {
stage('Example') {
steps {
sh './example.sh'
}
}
}
}
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)