Jenkinsfile default git checkout failing due access_rights Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Jenkinsfile with two git repositoriesCheckout Jenkins Pipeline Git SCM with credentials?Jenkins Pipeline based on groovy : unable to push into git => Permission denied (publickey)Using a Jenkins pipeline to checkout multiple git repos into same jobjenkins pipeline: agent vs node?How to run multiple stages on the same node with declarative Jenkins pipeline?Is it impossible to checkout a different branch in Jenkinsfile?One Jenkinsfile for multi project git repositoryStop Jenkins checking out Git URL in a Pipeline stageHow to push git tags to remote in Jenkins pipeline?
false 'Security alert' from Google - every login generates mails from 'no-reply@accounts.google.com'
Converting a text document with special format to Pandas DataFrame
Can a Wizard take the Magic Initiate feat and select spells from the Wizard list?
Does Prince Arnaud cause someone holding the Princess to lose?
Do chord progressions usually move by fifths?
Lights are flickering on and off after accidentally bumping into light switch
Is Vivien of the Wilds + Wilderness Reclamation a competitive combo?
lm and glm function in R
Is there a way to convert Wolfram Language expression to string?
Trying to enter the Fox's den
What is the difference between 准时 and 按时?
What is the ongoing value of the Kanban board to the developers as opposed to management
How is an IPA symbol that lacks a name (e.g. ɲ) called?
A German immigrant ancestor has a "Registration Affidavit of Alien Enemy" on file. What does that mean exactly?
Recursive calls to a function - why is the address of the parameter passed to it lowering with each call?
Is "ein Herz wie das meine" an antiquated or colloquial use of the possesive pronoun?
Can the van der Waals coefficients be negative in the van der Waals equation for real gases?
Why doesn't the university give past final exams' answers?
Raising a bilingual kid. When should we introduce the majority language?
Why is one lightbulb in a string illuminated?
tabularx column has extra padding at right?
Why do some non-religious people reject artificial consciousness?
Assertions In A Mock Callout Test
Is Bran literally the world's memory?
Jenkinsfile default git checkout failing due access_rights
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Jenkinsfile with two git repositoriesCheckout Jenkins Pipeline Git SCM with credentials?Jenkins Pipeline based on groovy : unable to push into git => Permission denied (publickey)Using a Jenkins pipeline to checkout multiple git repos into same jobjenkins pipeline: agent vs node?How to run multiple stages on the same node with declarative Jenkins pipeline?Is it impossible to checkout a different branch in Jenkinsfile?One Jenkinsfile for multi project git repositoryStop Jenkins checking out Git URL in a Pipeline stageHow to push git tags to remote in Jenkins pipeline?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
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'
jenkins jenkins-pipeline
add a comment |
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'
jenkins jenkins-pipeline
add a comment |
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'
jenkins jenkins-pipeline
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'
jenkins jenkins-pipeline
jenkins jenkins-pipeline
asked Mar 22 at 13:56
jgdjgd
3771522
3771522
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The solution to that was change username in Jenkins credetial to 'git'. It solves the issue.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55301181%2fjenkinsfile-default-git-checkout-failing-due-access-rights%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The solution to that was change username in Jenkins credetial to 'git'. It solves the issue.
add a comment |
The solution to that was change username in Jenkins credetial to 'git'. It solves the issue.
add a comment |
The solution to that was change username in Jenkins credetial to 'git'. It solves the issue.
The solution to that was change username in Jenkins credetial to 'git'. It solves the issue.
answered Mar 22 at 16:36
jgdjgd
3771522
3771522
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55301181%2fjenkinsfile-default-git-checkout-failing-due-access-rights%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown