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

SSH key credential doesn't work with key passphrase

      I added a SSH key credential with a passphrase set on the key. This credential was used in a job as credentials for a Git clone via ssh. The job was not able to execute the Git clone. It failed with the following error in the log:

      stdout: Cloning into '/var/lib/jenkins/jobs/Begin_Release/workspace'...

      stderr: Permission denied, please try again.
      Permission denied, please try again.
      Permission denied (publickey,password).
      fatal: The remote end hung up unexpectedly

      Inspecting the SSH log on the repository server revealed that the publickey method was never attempted. Executing the command as the Jenkins user from the commandline worked.

      This could only resolved by removing the passphrase from the key after which the job was able to clone the repository and execute as expected.

          [JENKINS-20638] SSH key credential doesn't work with key passphrase

          Florian Zschocke created issue -
          Mark Waite made changes -
          Link New: This issue duplicates JENKINS-20879 [ JENKINS-20879 ]
          Mark Waite made changes -
          Link New: This issue duplicates JENKINS-27998 [ JENKINS-27998 ]
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Dejay Clayton made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Mark Waite made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]
          Stephen Connolly made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 152163 ] New: JNJira + In-Review [ 207168 ]

            stephenconnolly Stephen Connolly
            f_zschocke Florian Zschocke
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: