fix: entrypoint.sh is not executable, every run fails with exit 126 #1

Merged
fmartingr merged 2 commits from butterrobot/fix-entrypoint-exec-bit into main 2026-09-09 19:53:12 +02:00 AGit
Member

entrypoint.sh is committed with mode 0644 while action.yml runs it directly as ${{ github.action_path }}/entrypoint.sh, so the action fails before the script starts with 'entrypoint.sh: Permission denied' and exitcode 126 — the SSH key is never read, which makes it look like an auth failure. Sets the exec bit, and also invokes via 'sh' so the action no longer depends on the mode bit surviving a checkout. Found while deploying fmartingr/fmartingr.com (FMG-7).

entrypoint.sh is committed with mode 0644 while action.yml runs it directly as `${{ github.action_path }}/entrypoint.sh`, so the action fails before the script starts with 'entrypoint.sh: Permission denied' and exitcode 126 — the SSH key is never read, which makes it look like an auth failure. Sets the exec bit, and also invokes via 'sh' so the action no longer depends on the mode bit surviving a checkout. Found while deploying fmartingr/fmartingr.com (FMG-7).
entrypoint.sh was committed with mode 0644 while action.yml invoked it
directly, so every run of this action died before the script started:

  entrypoint.sh: Permission denied
  exitcode '126': failure

Sets the executable bit, and invokes the script through sh so the action no
longer depends on the mode bit surviving a checkout.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ssh expands ~ from the passwd database rather than $HOME, so a container that
sets HOME elsewhere made ssh look for the key and known_hosts in a different
directory than the one the script had just written, failing with a confusing
"Identity file not accessible" / "Host key verification failed" pair.

The deploy key was also only removed on the success path, leaving the private
key on the runner whenever rsync failed; a trap now removes it either way.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
fmartingr approved these changes 2026-09-09 19:53:06 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
actions/ssh-deploy-action!1
No description provided.