mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 10:59:39 +00:00
When OpenClaw spawns an agent shell with a different HOME than the user that ran `gh auth login` (per-agent codex homes, systemd User= services, sudo'd shells), `gh` looks at $XDG_CONFIG_HOME/gh or $HOME/.config/gh and reports "not logged into any GitHub hosts" even though the operator HOME has a valid hosts.yml. Add `detectGhConfigDirMismatch` in src/agents/skills/gh-config-discovery.ts: a pure helper that takes process env plus a fileExists probe and returns either "auth-discoverable", "no-known-auth", "explicit-gh-config-dir-set", or a "mismatch" with the alternate config dir, the host file path, and a suggested GH_CONFIG_DIR value to set on the gateway service environment. The helper checks `/root`, `$SUDO_USER`'s home, and `$USER`'s home as candidate operator homes on Linux/macOS, and uses platform-specific path joins so the same logic works on Windows test runners. Wire the helper into the doctor skills health flow: when the github skill is reported and the gh binary is present, call the discovery helper and, on a mismatch, print a "GitHub CLI" note with the operator-actionable fix instructions before any unavailable-skill repair prompt. Update skills/github/SKILL.md with a troubleshooting subsection that documents GH_CONFIG_DIR for service/agent environments where HOME differs from the user that ran `gh auth login`. Fixes #78063. |
||
|---|---|---|
| .. | ||
| 1password | ||
| apple-notes | ||
| apple-reminders | ||
| bear-notes | ||
| blogwatcher | ||
| blucli | ||
| camsnap | ||
| canvas | ||
| clawhub | ||
| coding-agent | ||
| discord | ||
| eightctl | ||
| gemini | ||
| gh-issues | ||
| gifgrep | ||
| github | ||
| gog | ||
| goplaces | ||
| healthcheck | ||
| himalaya | ||
| imsg | ||
| mcporter | ||
| model-usage | ||
| nano-pdf | ||
| node-connect | ||
| notion | ||
| obsidian | ||
| openai-whisper | ||
| openai-whisper-api | ||
| openhue | ||
| oracle | ||
| ordercli | ||
| peekaboo | ||
| sag | ||
| session-logs | ||
| sherpa-onnx-tts | ||
| skill-creator | ||
| slack | ||
| songsee | ||
| sonoscli | ||
| spotify-player | ||
| summarize | ||
| taskflow | ||
| taskflow-inbox-triage | ||
| things-mac | ||
| tmux | ||
| trello | ||
| video-frames | ||
| voice-call | ||
| wacli | ||
| weather | ||
| xurl | ||
| pyproject.toml | ||