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;








0















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'













share|improve this question




























    0















    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'













    share|improve this question
























      0












      0








      0








      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'













      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 22 at 13:56









      jgdjgd

      3771522




      3771522






















          1 Answer
          1






          active

          oldest

          votes


















          0














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






          share|improve this answer























            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
            );



            );













            draft saved

            draft discarded


















            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









            0














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






            share|improve this answer



























              0














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






              share|improve this answer

























                0












                0








                0







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






                share|improve this answer













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







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 22 at 16:36









                jgdjgd

                3771522




                3771522





























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript