in Education by
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)

1 Answer

0 votes
by
The solution to that was change username in Jenkins credetial to 'git'. It solves the issue.

Related questions

0 votes
    I have a Jenkins project that does a gradle build and uploads build artifacts to a Nexus maven hosted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    I am successfully able to connect to a remote machine using SSH but when I am launching the agent from Jenkins ... overcome this issue? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I am successfully able to connect to a remote machine using SSH but when I am launching the agent from Jenkins ... overcome this issue? Select the correct answer from above options...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    I am trying to do a poc of Jenkins pipeline as code. I am using the Github organization folder plugin to ... descriptions for the jobs Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    In deploy scenario I need to create and run Jenkins task on the list of hosts, i.e. create something like a ... anyone help with it? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    In Jenkins, is there a way to restrict the user to view only certain jobs? Only through "Project-based ... allows job restriction? Select the correct answer from above options...
asked Jan 25, 2022 in Education by JackTerrance
0 votes
    Can someone help me to differentiate between DevOps and Docker? Select the correct answer from above options...
asked Jan 25, 2022 in Education by JackTerrance
0 votes
    What is the Git command to move branch pointer to different commit without checkout? A. Git cherrypick B. Git update-ref C. Git reset head...
asked Dec 24, 2022 in Technology by JackTerrance
0 votes
    What does the command git checkout branchname do? A. Adds the new branch B. Switches from main branch to the new branch C. Commits the new branch D. Deletes the new branch...
asked Dec 21, 2022 in Technology by JackTerrance
0 votes
    What does the command git checkout -b branchname do? A. Creates a new branch and switches to this new branch B. ... branch C. Deletes the new branch D. Commits the new branch...
asked Dec 20, 2022 in Education by JackTerrance
0 votes
    What is the difference between git checkout [branch name] and git checkout -b [branch name]?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
0 votes
    Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    An unhandled exception of type System.AggregateException occurred in mscorlib.dll Inner Exception: {"Response status ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    So I am trying to build a docker image with the Golang SDK, everything runs except the section in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
...