Skip to content

fix(ci): rewrite release pushes to SSH so the deploy key actually authenticates - #10

Merged
Mearman merged 1 commit into
mainfrom
fix/release-push-ssh-rewrite
Sep 12, 2026
Merged

fix(ci): rewrite release pushes to SSH so the deploy key actually authenticates#10
Mearman merged 1 commit into
mainfrom
fix/release-push-ssh-rewrite

Conversation

@Mearman

@Mearman Mearman commented Sep 12, 2026

Copy link
Copy Markdown
Member

Follow-up to #9. That PR wired a deploy key into the release job via actions/checkout's ssh-key input, but the release push failed identically afterward -- confirmed from the job log that no SSH transport was actually used. ssh-key only sets core.sshCommand for checkout's own operations; it doesn't rewrite the origin remote or any later push URL, and @semantic-release/git builds its push against a plain https://github.com/... URL. persist-credentials left the default GITHUB_TOKEN's HTTP auth header active, so that's what satisfied (and got rejected by) the push, never the deploy key.

This disables persist-credentials and adds a global git config url.insteadOf rewrite for https://github.com/, so semantic-release's hardcoded push URL actually goes out over SSH and GitHub attributes it to the deploy key.

…henticates

actions/checkout's ssh-key input only wires the deploy key into
core.sshCommand for its own git operations -- it never rewrites the
"origin" remote or any later command's push URL. @semantic-release/git
builds its push against a plain https://github.com/... URL, which the
still-active default-token credential (persist-credentials) satisfied
instead of the deploy key, so the previous fix never actually used SSH
and the release push kept failing identically.

Disabling persist-credentials and adding a global insteadOf rewrite for
every https://github.com/ URL makes semantic-release's hardcoded push
go out over SSH, where GitHub attributes it to the deploy key and the
ruleset's DeployKey bypass actually applies.
@Mearman
Mearman marked this pull request as ready for review September 12, 2026 12:31
@Mearman
Mearman merged commit ab43046 into main Sep 12, 2026
6 checks passed
@Mearman
Mearman deleted the fix/release-push-ssh-rewrite branch September 12, 2026 12:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-12T12:34:51.400521Z 0bfbce7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant