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

Pipeline Clone fails on zOS with SSH Key-pair with Passphrase

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • git-client-plugin
    • Jenkins:2.222.3
      git-client: 3.3.1
      git-plugin: 4.3.0
      z/OS R2.4
      git 2.14
    • 3.4.0

      When attempting to clone a repository using an SSH key-pair in a pipeline, the clone fails with
      Permission denied (publickey).
      if the key has a passphrase. The authentication succeeds if there is no passphrase. Various encodings have been attempted to get past this, including utf8, ISO8859-1, and IBM-1047.

      We are using an SSH Agent as a workaround for the time being, but that requires manually modifying the git configuration in new workspaces.

          [JENKINS-63146] Pipeline Clone fails on zOS with SSH Key-pair with Passphrase

          CI did not build

          Randall Becker added a comment - CI did not build

          It does not look like the build failure was related to the PR; rather, it looks like the CI job has an environment issue.

          Randall Becker added a comment - It does not look like the build failure was related to the PR; rather, it looks like the CI job has an environment issue.

          Currently under test on my z/OS system

          Randall Becker added a comment - Currently under test on my z/OS system

          Randall Becker added a comment - - edited

          Looks good. I ran two different jobs - one on a new workspace, one on an existing workspace with no updates. The expected messages came out correctly (repository name changed to protect the guilty):

          > git --version # timeout=10
          using GIT_SSH to set credentials
          Using passphrase charset 'IBM1047'
          > git fetch --tags --progress – git@Bitbucket.org:REPO-SLUG.git +refs/heads/:refs/remotes/origin/ # timeout=10
          Checking out Revision ce210a4618766170a0dd9cc6f2aee4a8563d4070 (refs/remotes/origin/development)

          and we had no authentication issues.

          As a side nit - the plugin does not recognize the repository format - probably also an encoding issue but that would be a separate case.

          My sincere thanks.

          Randall Becker added a comment - - edited Looks good. I ran two different jobs - one on a new workspace, one on an existing workspace with no updates. The expected messages came out correctly (repository name changed to protect the guilty): > git --version # timeout=10 using GIT_SSH to set credentials Using passphrase charset 'IBM1047' > git fetch --tags --progress – git@Bitbucket.org:REPO-SLUG.git +refs/heads/ :refs/remotes/origin/ # timeout=10 Checking out Revision ce210a4618766170a0dd9cc6f2aee4a8563d4070 (refs/remotes/origin/development) and we had no authentication issues. As a side nit - the plugin does not recognize the repository format - probably also an encoding issue but that would be a separate case. My sincere thanks.

          Mark Waite added a comment -

          rsbeckerca I'm unassigning this issue from me now. I won't merge the proposed pull request until you can confirm that the entire use case is working. Keep this issue updated as you make further progress. Thanks!

          Mark Waite added a comment - rsbeckerca I'm unassigning this issue from me now. I won't merge the proposed pull request until you can confirm that the entire use case is working. Keep this issue updated as you make further progress. Thanks!

          markewaite We have been using the fix for a week with no issues. I can confirm that the SSH key-pair is correctly authenticating with this option. The repository format recognition is a completely separate issue and unrelated. So the entire use case is working.

          Randall Becker added a comment - markewaite We have been using the fix for a week with no issues. I can confirm that the SSH key-pair is correctly authenticating with this option. The repository format recognition is a completely separate issue and unrelated. So the entire use case is working.

          Mark Waite added a comment -

          Thanks. Then all I need to do is add the documentation that describes the property. That's a good excuse to document the other properties provided by the plugin as well.

          Mark Waite added a comment - Thanks. Then all I need to do is add the documentation that describes the property. That's a good excuse to document the other properties provided by the plugin as well.

          Mark Waite added a comment -

          rsbeckerca I've added documentation for the other properties. Does the layout look reasonable to you? If so, then I'll submit a pull request for that documentation, then once it is merged, I'll update the docs in the PR for this property.

          Mark Waite added a comment - rsbeckerca I've added documentation for the other properties . Does the layout look reasonable to you? If so, then I'll submit a pull request for that documentation, then once it is merged, I'll update the docs in the PR for this property.

          I like the format. Actually learned something about tags that I was annoying - I want my tags being updated silently as long as they are verified. Side issue. Go for PR

          Randall Becker added a comment - I like the format. Actually learned something about tags that I was annoying - I want my tags being updated silently as long as they are verified. Side issue. Go for PR

          Mark Waite added a comment -

          Released in git client plugin 3.4.0 with the properties documented in plugin properties

          Mark Waite added a comment - Released in git client plugin 3.4.0 with the properties documented in plugin properties

            markewaite Mark Waite
            rsbeckerca Randall Becker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: