Skip to content

fix(release): push over SSH via repositoryUrl, not a git config rewrite - #11

Merged
Mearman merged 1 commit into
mainfrom
fix/release-repository-url
Sep 12, 2026
Merged

Mearman merged 1 commit into
mainfrom
fix/release-repository-url

Conversation

@Mearman

@Mearman Mearman commented Sep 12, 2026

Copy link
Copy Markdown
Member

Follow-up to #10, which still failed identically. Fetched @semantic-release/git's actual source: it pushes whatever origin string it's given verbatim, and semantic-release core is the layer that embeds an https://x-access-token:$GITHUB_TOKEN@github.com/... credential into the push URL whenever the resolved repositoryUrl is https://. #10's global git config url.insteadOf rewrite targeted a plain https://github.com/ prefix, but the actual push URL already had the token embedded before that prefix, so it never matched.

Setting repositoryUrl explicitly to the SSH form in release.config.ts skips that token-embedding path entirely (package.json's own repository field, public metadata, stays https://). The push then authenticates over SSH using the deploy key actions/checkout's ssh-key input already wires into core.sshCommand, and GitHub attributes it to the DeployKey bypass actor on the ruleset.

semantic-release builds its release-commit/tag push URL from the
resolved repositoryUrl, embedding an x-access-token:$GITHUB_TOKEN@
credential whenever that URL is https:// -- it never reads or
respects the ambient git remote or any url.insteadOf rewrite for this
purpose. The previous fix's global insteadOf mapping targeted a plain
https://github.com/ prefix, but the actual push URL already had a
token embedded before that prefix, so the rewrite never matched and
the push kept failing identically.

Setting repositoryUrl to the SSH form in release.config.ts (separate
from package.json's own git+https:// repository field, which is
public consumer metadata and stays as-is) skips the token-embedding
path entirely, so the push authenticates with whatever key
actions/checkout's ssh-key input already wired into core.sshCommand --
the deploy key registered as a DeployKey bypass actor on the ruleset.
@Mearman
Mearman marked this pull request as ready for review September 12, 2026 12:37
@Mearman
Mearman merged commit a402b71 into main Sep 12, 2026
6 checks passed
@Mearman
Mearman deleted the fix/release-repository-url branch September 12, 2026 12:37
@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:41:58.919506Z 495e7db 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