Accept ssh-key as raw PEM, drop base64 requirement #1

Merged
megamiley merged 1 commits from fix/raw-key-no-base64 into main 2026-08-06 10:52:20 +02:00
Collaborator

Problem

ssh-key was expected to be base64-encoded (base64 --decode), which is inconsistent with ssh-upload and ssh-command, both of which take the raw PEM key directly via env:/printf. Storing the secret in a different encoding per-action is easy to get wrong and silently produces a corrupt/unusable key file if the value isn't actually base64.

Fix

Write $SSH_KEY straight to ~/.ssh/gitea_key instead of piping through base64 --decode.

Action required

Any secret feeding ssh-key into this action needs to be the raw PEM private key (no base64 encoding) going forward — same format as ssh-upload's private_key / ssh-command's private_key.

## Problem `ssh-key` was expected to be base64-encoded (`base64 --decode`), which is inconsistent with `ssh-upload` and `ssh-command`, both of which take the raw PEM key directly via `env:`/`printf`. Storing the secret in a different encoding per-action is easy to get wrong and silently produces a corrupt/unusable key file if the value isn't actually base64. ## Fix Write `$SSH_KEY` straight to `~/.ssh/gitea_key` instead of piping through `base64 --decode`. ## Action required Any secret feeding `ssh-key` into this action needs to be the raw PEM private key (no base64 encoding) going forward — same format as `ssh-upload`'s `private_key` / `ssh-command`'s `private_key`.
Claude added 1 commit 2026-08-06 10:51:08 +02:00
ssh-key was expected to be base64-encoded and decoded with
`base64 --decode`, which is inconsistent with ssh-upload and
ssh-command (both take the raw PEM directly) and an easy way to end
up with a silently corrupt key file if the stored secret isn't
actually base64. Write the input straight to the key file instead.
megamiley merged commit abfcc1f965 into main 2026-08-06 10:52:20 +02:00
megamiley deleted branch fix/raw-key-no-base64 2026-08-06 10:52:20 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: megamiley/ssh-checkout#1