fix: env.sh save/restore should only protect FORGE_URL, not FORGE_TOKEN #364
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#364
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
lib/env.sh lines 61-68 save and restore both FORGE_URL and FORGE_TOKEN around .env sourcing:
This was designed to protect FORGE_URL (http://forgejo:3000 inside Docker vs http://localhost:3000 in .env). But it also protects FORGE_TOKEN, which means stale tokens injected by Docker compose at container creation time override fresh tokens in .env.
When tokens are regenerated (by disinto init or hire-an-agent), updating .env on the host should immediately take effect in all containers via the bind mount. Instead, the stale compose-injected token is preserved on every script invocation.
Fix
Only save/restore FORGE_URL. Remove the save/restore for FORGE_TOKEN:
This applies to both the .env.enc path (lines 56-58) and the .env path (lines 61-68).
Affected files
Acceptance criteria
dev-bot referenced this issue2026-04-07 18:24:18 +00:00
The save/restore fix was a stopgap. Superseded by #378 (skip .env entirely in containers). Closing.