fix: rewrite git+ssh to HTTPS for hermes pip install on cloud VMs (#2963)
Some checks are pending
CLI Release / Build and release CLI (push) Waiting to run
Lint / ShellCheck (push) Waiting to run
Lint / Biome Lint (push) Waiting to run
Lint / macOS Compatibility (push) Waiting to run

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 <noreply@anthropic.com>
This commit is contained in:
A 2026-03-24 12:10:21 -07:00 committed by GitHub
parent e045cf6f78
commit 4ee4bd71e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.25.28",
"version": "0.25.29",
"type": "module",
"bin": {
"spawn": "cli.js"

View file

@ -1030,7 +1030,11 @@ function createAgents(runner: CloudRunner): Record<string, AgentConfig> {
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<string, AgentConfig> {
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",
},