From b0718a5dac73b04d67e8e646bd13d51334ad3ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 8 Oct 2026 11:30:09 +0200 Subject: [PATCH] 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'). --- site-cookbooks/kosmos-mastodon/recipes/build.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site-cookbooks/kosmos-mastodon/recipes/build.rb b/site-cookbooks/kosmos-mastodon/recipes/build.rb index 3c85ccd..a849bd8 100644 --- a/site-cookbooks/kosmos-mastodon/recipes/build.rb +++ b/site-cookbooks/kosmos-mastodon/recipes/build.rb @@ -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"