-
Improvement
-
Resolution: Duplicate
-
Minor
-
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.
- duplicates
-
JENKINS-50181 ssh-agent/ssh-credentials-plugin failing because ssh-add expects a newline in the keyfile
- Resolved