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

Ensure newline at the end of SSH key blocks


    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • ssh-agent-plugin
    • None

      The ssh-agent from OpenSSH will fail in a spectacularly opaque manner if the key block in the identity file does not end with a newline–it simply keeps asking for a passphrase, which will either fail instantly (if there's no passphrase) or the second time (if the shell script has already erased itself). The credential UI provides no help to ensure the presence of a trailing newline.

      Since there's no harm in an extra newline in the file, I suggest either confirming that the key text ends in a newline or blindly adding one when writing it to the temp file.

            Unassigned Unassigned
            chrylis Christopher Smith
            0 Vote for this issue
            1 Start watching this issue