fix(release): set gitPublish.username / password from env (real bot user)#25
Merged
Merged
Conversation
gradle-git-publish 5.x — pulled in by `com.agorapulse.gradle.guide` —
dropped the legacy `GRGIT_USER` / `GRGIT_PASS` env vars and the
`org.ajoberstar.grgit.auth.username` system property the original
Kordamp-era release workflow relied on. Per the v5 README:
> If you relied on Grgit's authentication, such as GRGIT_USER, use the
> new username and password properties on the GitPublication.
This was why the 1.0.0.RC2 / RC3 retries reached `:guide:gitPublishPush`
and crashed with `fatal: could not read Username for 'https://github
.com'`. The git CLI prompts for credentials because no auth has been
plumbed through.
Configure them straight on the gitPublish extension in
docs/guide/guide.gradle, sourcing values from environment variables
that the workflow sets right before the gradle invocation:
gitPublish {
username = providers.environmentVariable('GIT_PUBLISH_USERNAME').orElse('')
password = providers.environmentVariable('GIT_PUBLISH_PASSWORD').orElse('')
}
release.yml passes the real bot account name (agorapulse-bot) as the
username and the existing AGORAPULSE_BOT_PERSONAL_TOKEN as the
password — standard GitHub HTTPS basic-auth pattern. Drops the
now-useless `-Dorg.ajoberstar.grgit.auth.username` flag and qualifies
the task path to `:guide:gitPublishPush` so it matches the rethrow
exemplar exactly.
This mirrors the fix that landed on micronaut-rethrow at the
3.0.0.RC3 tag (commit 3ee67e9), which is the version that actually
released successfully end-to-end.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The 1.0.0.RC2 / RC3 retries reached
:guide:gitPublishPush(so PR #23 + PR #24 did clear the previous blockers) but then crashed with:gradle-git-publish:5.1.2— pulled in bycom.agorapulse.gradle.guide— dropped the legacyGRGIT_USER/GRGIT_PASSenv vars and the-Dorg.ajoberstar.grgit.auth.username=...system property the old Kordamp-era workflow relied on. The v5 README is explicit:This PR applies exactly the fix that landed on micronaut-rethrow at the 3.0.0.RC3 tag (commit 3ee67e9) — that's the rethrow tag that actually released end-to-end:
docs/guide/guide.gradle— set credentials on thegitPublishextension directly, reading fromGIT_PUBLISH_USERNAME/GIT_PUBLISH_PASSWORDenv vars:gitPublish { username = providers.environmentVariable('GIT_PUBLISH_USERNAME').orElse('') password = providers.environmentVariable('GIT_PUBLISH_PASSWORD').orElse('') }.github/workflows/release.yml— passagorapulse-botas username and the existingAGORAPULSE_BOT_PERSONAL_TOKENas password (standard GitHub HTTPS basic-auth). Drop the now-useless-Dorg.ajoberstar.grgit.auth.username=…flag. Qualify the task path to:guide:gitPublishPushso the gradle command matches the rethrow exemplar 1:1.Test plan
1.0.0.RC3tag (or cut1.0.0.RC4) so the publishing workflow runs end-to-end.🤖 Generated with Claude Code