From 4ee4bd71e690a3ed584be456e906ed3efd5fb8d3 Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Tue, 24 Mar 2026 12:10:21 -0700 Subject: [PATCH] fix: rewrite git+ssh to HTTPS for hermes pip install on cloud VMs (#2963) The hermes install script's mini-swe-agent pip dependency uses git+ssh:// URLs that timeout on fresh cloud VMs (hetzner/gcp/digitalocean) where outbound SSH to GitHub is blocked or slow. Add `git config --global url.https://github.com/.insteadOf` rules before the hermes install and update commands to force git to use HTTPS instead of SSH for all GitHub URLs. This eliminates the SSH connection timeout that was causing install failures. Fixes #2955 Agent: ux-engineer Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 --- packages/cli/package.json | 2 +- packages/cli/src/shared/agent-setup.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 0052dd59..066c5a8a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/spawn", - "version": "0.25.28", + "version": "0.25.29", "type": "module", "bin": { "spawn": "cli.js" diff --git a/packages/cli/src/shared/agent-setup.ts b/packages/cli/src/shared/agent-setup.ts index e85710b8..8930b913 100644 --- a/packages/cli/src/shared/agent-setup.ts +++ b/packages/cli/src/shared/agent-setup.ts @@ -1030,7 +1030,11 @@ function createAgents(runner: CloudRunner): Record { installAgent( runner, "Hermes Agent", - "curl --proto '=https' -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -s -- --skip-setup", + // Force git to use HTTPS instead of SSH for GitHub URLs — pip dependencies + // using git+ssh:// timeout on cloud VMs where outbound SSH is blocked/slow. + 'git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" && ' + + 'git config --global url."https://github.com/".insteadOf "git@github.com:" && ' + + "curl --proto '=https' -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -s -- --skip-setup", 600, ), envVars: (apiKey) => [ @@ -1050,6 +1054,9 @@ function createAgents(runner: CloudRunner): Record { launchCmd: () => "source ~/.spawnrc 2>/dev/null; export PATH=$HOME/.local/bin:$HOME/.hermes/hermes-agent/venv/bin:$PATH; hermes", updateCmd: + // Same SSH→HTTPS rewrite for auto-update runs + 'git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" && ' + + 'git config --global url."https://github.com/".insteadOf "git@github.com:" && ' + "curl --proto '=https' -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -s -- --skip-setup", },