2.4 KiB
2.4 KiB
Windows Runner Mapped-Share Git Safety
Symptoms
- Running
agent-bus/runners/windows/garage-agent-runner.ps1onpumpagainstB:\git\agent-knowledge-basefailed during repository inventory. - Git reported
dubious ownershipfor the mapped path\\wuu\C\git\agent-knowledge-base. - A later heartbeat pass also risked writing a remote URL with password-like userinfo from a local project repository.
Environment
- Machine:
pump - Date: 2026-05-24
- Repository path:
B:\git\agent-knowledge-base, mapped to\\wuu\C\git\agent-knowledge-base - Runner: Windows
garage-agent-runner
Root Cause
- The runner used plain
git -C <path> ...for repository inventory. On Windows mapped shares, the repository owner SID may differ from the current Windows user, so Git refuses the checkout unlesssafe.directoryis configured. - The runner also wrote raw
originremote URLs into heartbeat files, which can leak credential-like URL userinfo if an old remote usesssh://user:password@host/path.gitor similar syntax.
Fix
- Update runner Git calls to include
git -c safe.directory=*for inventory and bus operations. - Normalize
Resolve-Pathresults with.ProviderPathin both the runner and scheduled-task installer. Without this, elevated or UNC execution can passMicrosoft.PowerShell.Core\FileSystem::\\...paths intopowershell -Fileorgit -C, which fails. - Scheduled tasks should run the runner with
-Once; Task Scheduler should own the repeat interval. Do not schedule a never-ending polling loop on a repeating trigger. - Redact remote URL userinfo before writing heartbeat files:
ssh://<redacted>@host/path.git
Verification
- Manual one-shot runner pass on
pumpcompleted after the fix. - Safe command
agent-bus/commands/pump/2026-05-24-connectivity-ping.mdproduced resultagent-bus/results/pump/20260524-170437-2026-05-24-connectivity-ping.md. - After the UNC and
-Oncefixes,garage-agent-runner-pumpwas installed from elevated PowerShell and the delivery ping commandagent-bus/commands/pump/2026-05-24-pump-delivery-ping.mdproduced resultagent-bus/results/pump/20260524-173928-2026-05-24-pump-delivery-ping.md. agent-bus/heartbeats/pump.mdno longer stores the credential-like remote URL userinfo.
Related Files
agent-bus/runners/windows/garage-agent-runner.ps1skills/multi-machine-agent-orchestration.mdagent-bus/heartbeats/pump.md