Skip to content

Conversation

@rhoegg
Copy link
Contributor

@rhoegg rhoegg commented Sep 1, 2025

Summary

  • Fix git push permission denied error during maven-release:prepare
  • Add write permissions for GitHub Actions to push commits back to repository

Changes

  • Add permissions: contents: write to workflow job
  • Explicitly pass token: ${{ secrets.GITHUB_TOKEN }} to checkout action

Problem

The maven-release plugin needs to push commits (version updates, tags) back to the repository during the release process, but was getting "Permission denied (publickey)" error.

Test plan

  • GitHub Actions workflow can successfully push commits during release:prepare

- Add 'contents: write' permission to allow pushing commits
- Explicitly use GITHUB_TOKEN in checkout action
- Remove pinentry-mode config from maven-gpg-plugin (use env var instead)
- Fixes git push permission denied error during release:prepare
@rhoegg rhoegg force-pushed the fix-release-permissions branch from 00f84ed to 090d79e Compare September 1, 2025 21:35
rhoegg and others added 5 commits September 1, 2025 16:40
- Add git config to rewrite SSH URLs to HTTPS with token
- Add fetch-depth: 0 for full history (needed for release plugin)
- Fixes SSH permission denied error during git push
- Use persist-credentials: false in checkout
- Set remote URL with token in Configure Git step
- Remove complex URL rewriting
- Keep fetch-depth: 0 for release plugin to access full history
- Change SCM URLs from SSH to HTTPS in pom.xml
- Configure git credential helper with GitHub token
- Maven-release-plugin uses SCM URLs, not git remote
@rhoegg rhoegg merged commit c1b83dc into main Sep 1, 2025
2 checks passed
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.

3 participants