Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53134

Git checkout fails when using an SSH key with a passphrase

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • git-plugin
    • None
    • Jenkins core 2.121.2 and 2.107.x
      Git Plugin latest
      Git api latest

    Description

      Issue:
      A checkout from the master can not be performed when using a ssh key with a passphrase. It will hang on this step:

      > git fetch --tags --progress git@github.com:alexanderrtaylor/support-kb-articles.git +refs/heads/*:refs/remotes/origin/*
      

      And eventually fail.

      Workaround:
      You can remove the passphrase and it will work normally

      Steps to reproduce:
      1. Create a SSH key with a specific passphrase like `testing` and add it to Jenkins
      2. Add ssh key to github
      3. Create a job(freestyle or pipeline the behavior is the same)
      4. Use the SSH key connect to the ssh location of the git url
      5. Watch as the job fails.

      This works normally if I use a shell step to clone from the agent but the git plugin seems to be causing the issue

      Attachments

        Issue Links

          Activity

            ataylor Alex Taylor created issue -
            markewaite Mark Waite made changes -
            Field Original Value New Value
            Assignee Mark Waite [ markewaite ]
            markewaite Mark Waite made changes -
            Link This issue is related to JENKINS-20879 [ JENKINS-20879 ]
            markewaite Mark Waite made changes -
            Link This issue duplicates JENKINS-20879 [ JENKINS-20879 ]
            markewaite Mark Waite made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
            markewaite Mark Waite made changes -
            Link This issue is related to JENKINS-20879 [ JENKINS-20879 ]
            markewaite Mark Waite made changes -
            Link This issue duplicates JENKINS-25194 [ JENKINS-25194 ]
            markewaite Mark Waite made changes -
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              Unassigned Unassigned
              ataylor Alex Taylor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: