Closed jakubboucek closed 10 months ago
I'm having the exact same issue. Thank you for your work figuring it out and submitting a PR. I hope it gets approved and merged soon!
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Should be fixed in latest version https://github.com/easingthemes/ssh-deploy/releases/tag/v4.1.10
@jakubboucek Is the issue fixed in v4.1.10?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
State:
ubuntu-latest
ed25519
- stored at GitHub repository Secret, handled by${{ secrets.SSH_PRIVATE_KEY }}
Unexpected state:
Expected state:
Whats wrong:
Found success bypass:
Action works great when I add on new-line at the end of private key. (I't not a file, it's secret variable putted into GitHub web Form).
Probably bug reason:
The OpenSSH does not accept Windows-like new line (
\r\n
) and requires only Linux-like new line (\n
). But this project appends Windows new line chars info end of key file:https://github.com/easingthemes/ssh-deploy/blob/cf583aab4f795049a9b06ceab8404ea398a22f3f/src/sshKey.js#L22
This theory is verified by simple test:
Causes to:
Load key "test-key": error in libcrypto
.Theory is also verified when I append one superfluous new line (
\n
) at the end of the key – SSH requires Linux-like new line immediately after PEM envelope, but ignores following content in file.Expected fix:
Remove hard-coded Windows new-line from
sshKey.js
script.