Ensure the SSH deploy key ends with a newline

OpenSSH's PEM parser rejects a private key file without a trailing newline ('error in libcrypto').
This commit is contained in:
raucao committed 2026-10-08 11:30:09 +02:00
1 parent aeeb900f14
commit b0718a5dac
1 file changed
+2 -1
@@ -52,7 +52,8 @@ directory "#{mastodon_path}/.ssh" do
end
file "#{mastodon_path}/.ssh/id_ed25519" do
content credentials["repo_deploy_key"]
# OpenSSH's PEM parser rejects a private key without a trailing newline
content lazy { credentials["repo_deploy_key"].to_s.chomp + "\n" }
owner mastodon_user
group mastodon_user
mode "0600"