Skip to content

Fix: Authenticate release workflow via SSH deploy key - #6

Merged
tajobe merged 2 commits into
mainfrom
fix/release-workflow-ssh-auth
Jul 22, 2026
Merged

Fix: Authenticate release workflow via SSH deploy key#6
tajobe merged 2 commits into
mainfrom
fix/release-workflow-ssh-auth

Conversation

@tajobe

@tajobe tajobe commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The Create Release workflow's actions/checkout step used secrets.PAT, a personal access token last updated in 2023 that had gone stale — causing fatal: could not read Username for 'https://github.com': terminal prompts disabled on fetch.
  • A PAT (rather than the default GITHUB_TOKEN) is required here because pushes made with the default token don't trigger downstream workflows (needed so the new tag kicks off Publish).
  • Switched to a repo-scoped SSH deploy key instead: actions/checkout now uses ssh-key: secrets.COMMIT_KEY, and webfactory/ssh-agent@v0.10.0 loads the same key into an agent so axion-release can push the release tag/commit over SSH.
  • Generated an ed25519 deploy keypair, registered the public half on the repo with write access, and set the private half as the COMMIT_KEY secret.
  • Removed the DEPLOY_KEY env var — nothing in axion-release-plugin actually reads it, so it was dead config.

Test plan

  • YAML syntax validated
  • Deploy key registered on the repo with write access (gh api repos/dotRun/MCVotifierLib/keys), confirmed via API response (read_only: false)
  • COMMIT_KEY secret set and confirmed present (gh secret list)

Next: re-run the Create Release workflow after merging to confirm the fix end-to-end.

…e PAT

The release-workflow checkout used a personal access token (secrets.PAT)
that had gone stale, causing 'terminal prompts disabled' failures on
fetch. Switch to a repo-scoped SSH deploy key (secrets.COMMIT_KEY) with
write access, loaded via webfactory/ssh-agent so axion-release can push
the release tag/commit over SSH. Also drops the DEPLOY_KEY env var,
which nothing in axion-release-plugin actually reads.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the “Create Release” GitHub Actions workflow authentication by replacing a stale Personal Access Token (PAT) with an SSH deploy key, so the workflow can fetch/push over SSH and still trigger downstream workflows (e.g., Publish) via tag pushes.

Changes:

  • Updated actions/checkout in the release workflow to authenticate using secrets.COMMIT_KEY via ssh-key.
  • Added webfactory/ssh-agent@v0.10.0 to load the same deploy key for subsequent git operations during the release step.
  • Removed the unused DEPLOY_KEY environment variable from the Gradle release steps and documented the fix in the changelog.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
CHANGELOG.md Notes the workflow authentication fix (SSH deploy key replacing stale PAT).
.github/workflows/release-workflow.yml Switches checkout/auth to COMMIT_KEY via SSH and removes dead env config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

v4 was several majors behind current (v7.0.1). Verified our fetch-depth
and ssh-key usage is unaffected by the intervening breaking changes
(Node 24 runtime bump in v5/v6, fork-PR checkout restriction in v7 that
only applies to pull_request_target/workflow_run triggers, neither of
which this workflow uses).
@tajobe
tajobe merged commit 910c653 into main Jul 22, 2026
1 check passed
@tajobe
tajobe deleted the fix/release-workflow-ssh-auth branch July 22, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants