Repository navigation
Conversation
PR #382 plumbed GITHUB_PAT into the clawdbot-gateway env (verified: env var present, length matches the api-keys secret). What it did NOT do is wire the credential helper, so every `git clone https://...` from within the pod (subagent / acpx / operator `kubectl exec`) hits: `fatal: could not read Username for 'https://github.com'` Surfaced 2026-05-20 smoke cycle 10: Theo tried to clone Team-Commonly/clawdbot to investigate the heartbeat-clobber bug — got the unauthenticated-clone error even though GITHUB_PAT was in env. Fix: extend the existing lifecycle.postStart hook (already used for the codex auth.json copy) to ALSO write a credential helper config when GITHUB_PAT is set. Mirrors the cloud-codex boot script's wiring so both runtimes are consistent: - trim trailing newline / CR (libcurl rejects PATs with newlines) - write `/state/.git-credentials` (0600, persists on the PVC) - point git's credential.helper at that file globally - set git author identity to Clawdbot Agent / [email protected] Silent no-op when GITHUB_PAT is empty — keeps the hook safe for community-tier deployments that ship no PAT by design. Idempotent — repeated postStart invocations (on container restart) overwrite the same file with the same content.
2 tasks
samxu01
added a commit
that referenced
this pull request
May 22, 2026
Reviewer on PR #414 asked: are GIT_AUTHOR_NAME / GIT_AUTHOR_EMAIL expected to be set externally, or should they be defined in the deployment template like GITHUB_PAT is? Answer: there is currently no per-agent author override flowing through Helm values. The shell fallbacks ('Clawdbot Agent' / '[email protected]') are the intended default. If operators want to override later — e.g. per-instanceId author for clearer commit attribution — they can either: - add them to the env: block as plain value: entries, OR - wire them through values.yaml as .Values.agents.clawdbot.git.* Either path is one small follow-up PR. Documenting the intent inline so the next reader doesn't have to re-derive it. No behavioral change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #382 plumbed
GITHUB_PATinto the clawdbot-gateway env var but never wired it intogit. The env is present (verified: 93 chars), but everygit clone https://...from inside the pod (subagents, acpx_run, operatorkubectl exec) fails with:Repro (from 2026-05-20 smoke cycle 10)
Theo (
openclaw:theo) was asked to cloneTeam-Commonly/clawdbotto investigate the heartbeat-clobber bug. Got the unauthenticated-clone error. Without git credentials, openclaw agents can nevergit clone/git push/ghagainst private repos — blocks any agent-driven repo metadata work.Fix
Extend the existing
lifecycle.postStarthook (already used for the codex auth.json copy) to ALSO write a git credential.helper config whenGITHUB_PATis set. Mirrors the cloud-codex boot script's wiring (both runtimes consistent):/state/.git-credentials(0600, persists on PVC)git config --global credential.helperat that fileClawdbot Agent <[email protected]>Silent no-op when
GITHUB_PATis empty — keeps community-tier deployments safe.Idempotent — repeated postStart invocations rewrite the same content.
Test plan
kubectl exec -n commonly-dev deploy/clawdbot-gateway -- git clone https://github.com/Team-Commonly/commonly /tmp/tsucceeds without promptingacpx_run -> gh issue list --repo Team-Commonly/commonlyand verify real output (not auth error)🤖 Generated with Claude Code