fix(svc): forward FORGEJO_TOKEN to release-asset downloads (private repo support) #225
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_skills!225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik_download_private_auth"
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?
Adds an
Authorization: tokenheader to the two curl invocations insvc_resolve_release_tagandsvc_download_asset, sourced from$env.FORGEJO_TOKENwhen present. Public-repo behaviour is unchanged (empty header list when the token isn't set; Forgejo accepts public asset requests with or without the header).Why
Surfaced by the hero_office v0.1.0-rc1 smoke on heroci (Bucket C item 4 of lhumina_code/home#212).
hero_officeis the only private non-archived repo inlhumina_code/, so its release assets 404 anonymously even though every other Hero stack repo (collab, agent, embedder, books, …) returns them publicly. The prior helper commentNo auth needed — Forgejo release assets are world-readablewas an unintended invariant.Scope
svc_forge_auth_argshelper added: returns[]if no token,["-H" "Authorization: token X"]if set.svc_resolve_release_tagandsvc_download_assetsplat...$authinto their^curlcalls.private repos need FORGEJO_TOKEN in env.svc_release_asset_urlupdated.No behaviour change for the 20 services on public repos (collab, agent, embedder, voice, editor, books, browser, slides, biz, foundry, whiteboard, matrixchat, hero_do, runner_rhai, proc, router, proxy, db, indexer, aibroker, osis). New behaviour for hero_office (and any future private repos).
Verification
Local (workstation, FORGEJO_TOKEN exported):
Heroci smoke (FORGEJO_TOKEN exported via SSH inline):
All 3 binaries: ELF 64-bit LSB pie executable, static-pie linked, stripped.
Operator note
For private repos, the operator must
source ~/hero/cfg/env/env.sh(or otherwise export FORGEJO_TOKEN) before runningservice <name> install --download. Heroci does not currently have FORGEJO_TOKEN in any login script — out of scope for this PR; will be follow-up bookkeeping if/when more private repos are added.mik-tf referenced this pull request from lhumina_code/hero_demo2026-05-06 21:42:24 +00:00