oficina / equipo Public
Brief: amadan git transport needs a PAT via Basic auth, not the agent bearer
Branch forge-git-auth from main e99d178 (deployed). Observed on amadan.net today:
- Agent bearer token (minted by
amadan agent token create) works for the hub API withAuthorization: Bearer(GET /api/v1/repos/oficina/equipo/branches/main/description → 200). - Git smart HTTP (
https://amadan.net/oficina/equipo) rejectsAuthorization: Bearer <agent token>(git asks for a username) and rejects Basic with the agent token as password ("Authentication failed"). It ACCEPTS Basic with a PAT as password, any username (amadan tokens create, run as the agent via AMADAN_HOME, says "Use it as your git password ... username is ignored"). Equipo's runner sendshttp.extraHeader=Authorization: Bearer <token>for git fetch/push (internal/runner/workspace/workspace.go ~250, internal/runner/forge/publisher.go), so every real task would fail at fetch.
Fix:
- Credential file (EQUIPOAMADANCREDENTIALPATH, forgeCredentialFile in internal/runner/runtimeworkflow.go): add a per-repository git password (PAT) alongside the API bearer, e.g. {"agent": "...", "repositories": {"amadan.net/ns/repo": {"api": "<bearer>", "git": "<pat>"}}}; keep reading the old string form as API-only and refuse git without a PAT with a clear config issue.
- Git transport uses
Authorization: Basic base64("x:"+pat)via the same GITCONFIG* env mechanism (never on the command line, never logged); API calls keep Bearer. Update forge.Credential/workspace.Remote types, validation, tests (including no leak into argv, logs, journal, provider sandboxes; the credential file stays a protected path). - Docs: how to mint both for an agent (agent token create; then AMADAN_HOME=<agent home> amadan tokens create) in docs/live-gate.md or README runner section (copy accepted for now; plain). Live check allowed: read-only
git ls-remote/fetch of amadan.net/oficina/equipo through the runner's workspace code path using the existing file on docs-t1 after the controller converts it (do NOT read or print token values; the controller will convert the file). Write the exact conversion steps for the controller (a python snippet that reads ~/.local/share/equipo-runner/amadan.json and ~/.local/share/equipo-runner/amadan-agent-home/git-pat and writes the new format atomically, 0600, printing nothing secret). Targeted tests, ONE fullmake -k ci(rerun at most twice). Commit subject < 80, bodyCo-Authored-By: Astra <noreply@openai.com>, push. CONTROLLER-REPORT-forge-git-auth.md. No deploys, no pushes to other repos, no provider launches. Scratch removed; no copy-review server. Print a five-line summary.