Skip to content

Agent sessions use HTTPS for github.com, sidestepping sandbox SSH block - #25

Merged
technicalpickles merged 1 commit into
mainfrom
agent-https-git-transport
Aug 26, 2026
Merged

Agent sessions use HTTPS for github.com, sidestepping sandbox SSH block#25
technicalpickles merged 1 commit into
mainfrom
agent-https-git-transport

Conversation

@technicalpickles

Copy link
Copy Markdown
Owner

Summary

  • The Claude Code sandbox denies outbound port 22 at the TCP connect level, so agent git push/fetch/pull/clone over SSH fails and needs dangerouslyDisableSandbox every time
  • Adds url.insteadOf (rewrite git@github.com: to https://github.com/) and a gh-backed credential helper to both claude-agent-work and claude-agent-home (ADR 0031's role-scoped fragments), so agent sessions transparently use HTTPS instead
  • Scoped to agent sessions only, via the existing GIT_CONFIG_GLOBAL mechanism -- interactive shells are untouched and keep using SSH

Test plan

  • git ls-remote via the new config, sandboxed (no override) -- resolved over HTTPS
  • git push/delete of a scratch branch against technicalpickles/dotfiles via the new config, sandboxed -- succeeded, cleaned up
  • Commit signing still produces a Good signature for the agent identity (signing is local, unaffected by transport)
  • This very PR was pushed sandboxed using the pattern this PR introduces

Related: pickletown bean gt-o2jy (the underlying investigation) and dotfiles-187t.

…box SSH block

The Claude Code sandbox denies outbound port 22 at the TCP connect level, so
every agent git push/fetch/pull/clone over SSH fails and needs
dangerouslyDisableSandbox as a workaround. HTTPS to github.com already works
sandboxed. Rewrite git@github.com: to https://github.com/ and wire up gh's
credential helper in both role-scoped agent gitconfig fragments (ADR 0031).
Only affects agent sessions; interactive shells keep using SSH.

Verified sandboxed: push + fetch succeed via a scratch branch on
technicalpickles/dotfiles (cleaned up after), and commit signing is
unaffected (still a Good signature for josh.nichols+agent@gusto.com).

See pickletown bean gt-o2jy for the underlying investigation.
@technicalpickles
technicalpickles merged commit 1118bca into main Aug 26, 2026
1 check passed
@technicalpickles
technicalpickles deleted the agent-https-git-transport branch August 26, 2026 18:24
technicalpickles added a commit that referenced this pull request Aug 26, 2026
Follow-up to dotfiles-187t/#25 (agent-only HTTPS transport). Tracks the
open question of whether to also default human-interactive git to
HTTPS, and what -- if any -- work/Gusto-side reasons exist to keep SSH
before making that call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant