hermes - 💡(How to fix) Fix non-default profile gateway fails: /root/.ssh/config not found [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

s6-setuidgid hermes switches to the hermes user (uid=1000, home=/opt/data). However, when with-contenv is involved (the #!/command/with-contenv sh shebang), HOME can resolve to /root from the root-level environment before the UID switch. SSH client then expands ~ to /root, looks for /root/.ssh/config — which does not exist — and the kanban worker blocks.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug Description

When a non-default profile gateway (e.g. server-ops) starts via s6 supervision, SSH cannot find ~/.ssh/config because HOME is not properly set after s6-setuidgid hermes drops to the hermes user.

The run script is generated by _render_run_script in hermes_cli/service_manager.py (line ~622):

Current: lines.append(f"exec s6-setuidgid hermes hermes -p {shlex.quote(profile)} gateway run")

After fix: lines.append(f"exec s6-setuidgid hermes env HOME=/opt/data hermes -p {shlex.quote(profile)} gateway run")

Root Cause

s6-setuidgid hermes switches to the hermes user (uid=1000, home=/opt/data). However, when with-contenv is involved (the #!/command/with-contenv sh shebang), HOME can resolve to /root from the root-level environment before the UID switch. SSH client then expands ~ to /root, looks for /root/.ssh/config — which does not exist — and the kanban worker blocks.

Environment

  • Container: nousresearch/hermes-agent:v2026.5.29.2
  • Supervision: s6-overlay v3.2.3.0
  • Affected profiles: any non-default profile with terminal toolset
  • SSH config location: /opt/data/.ssh/config

Proposed Fix

Explicitly pass HOME=/opt/data inside the env command after the UID drop:

exec s6-setuidgid hermes env HOME=/opt/data hermes -p <profile> gateway run

Also fix the default profile variant: exec s6-setuidgid hermes env HOME=/opt/data hermes gateway run

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix non-default profile gateway fails: /root/.ssh/config not found [1 pull requests]