fix: fix: edge entrypoint clones disinto repo without auth — fails when Forgejo requires authentication (#353) #363
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#363
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-353"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #353
Changes
AI Review
Summary
This PR fixes unauthenticated git clones failing against a Forgejo instance with
REQUIRE_SIGN_INenabled. It injectsFORGE_TOKENinto the git clone URL via sed substitution in two places: the edge entrypoint and the CI clone override. It also propagates the token to CI pipelines viaWOODPECKER_ENVIRONMENT.Findings
info
docker/edge/entrypoint-edge.sh:12: Aftergit clone, the auth URL (with embedded token) is stored in/opt/disinto/.git/config. This is acceptable here because the edge container does not mount/opt/disintoto a named volume — the path is ephemeral container storage that disappears on container removal. No persistent token leakage.info
.woodpecker/ci.yml:19-22: The same token-in-origin-URL is stored in the CI workspace.git/configafter clone. CI steps run in throwaway containers, so this is transient. The subsequentgit fetch origin "$CI_COMMIT_REF"correctly reuses the auth-embedded origin URL.info
lib/generators.sh:82:WOODPECKER_ENVIRONMENT: "FORGE_TOKEN:${FORGE_TOKEN}"uses the colon-separator format, which is correct for Woodpecker's global environment injection (documented format:key:value).Correctness
All three changes are necessary and consistent with the approach used in the adjacent fix (#361). The sed pattern
s|://|://token:$FORGE_TOKEN@|is correct for HTTP(S) URLs and matches what was done for the Forgejo push auth fix. The CI clone sequence (clone default → fetch ref → checkout FETCH_HEAD) is a standard pattern for handling PR refs that may not exist on the default branch.Verdict
APPROVE — Correct fix: token injection follows the same pattern as PR #361 and is properly scoped to ephemeral containers.
Reviewed at
8480308| AGENTS.mdAI Review: APPROVE — Correct fix: token injection follows the same pattern as PR #361 and is properly scoped to ephemeral containers.