Skip to content

[codex] Improve remote clone SSH failures#387

Merged
adamziel merged 1 commit into
trunkfrom
codex/remote-clone-ssh-errors
May 19, 2026
Merged

[codex] Improve remote clone SSH failures#387
adamziel merged 1 commit into
trunkfrom
codex/remote-clone-ssh-errors

Conversation

@adamziel
Copy link
Copy Markdown
Contributor

What it does

Makes forkpress remote clone fail faster and with a useful diagnostic when SSH/rsync cannot reach the remote site.

The CLI now:

  • adds a 10-second SSH connect timeout to ForkPress-driven SSH commands
  • validates an explicitly supplied --ssh-key path before starting rsync
  • captures failing rsync stderr and classifies common failures: timeout, connection refused, permission denied, and bad remote path
  • prints a copy-paste ssh ... 'test -f .../wp-load.php' command for verifying the target outside ForkPress
  • updates the remote-site docs with the same diagnostic command

Rationale

A timed-out SSH port currently surfaces as raw ssh/rsync output followed by forkpress: rsync exited with exit status: 255. That hides the actual next step: confirm the host's SSH port/firewall/IP allowlist before debugging WordPress import or COW branching.

Implementation

remote_clone_command now runs rsync through Command::output() so ForkPress can shape the error instead of losing context after rsync exits. The remote clone SSH helper adds ConnectTimeout=10, and the error formatter includes the exact remote wp-load.php preflight command with shell-safe quoting.

Testing instructions

Checked locally:

cargo fmt --check
FORKPRESS_RUNTIME_BUNDLE=/dev/null cargo test -p forkpress-cli remote_clone
git diff --check

@adamziel adamziel marked this pull request as ready for review May 19, 2026 09:08
@adamziel adamziel merged commit 2bcc7a2 into trunk May 19, 2026
3 checks passed
@adamziel adamziel deleted the codex/remote-clone-ssh-errors branch May 19, 2026 09:08
@adamziel adamziel mentioned this pull request May 19, 2026
adamziel added a commit that referenced this pull request May 19, 2026
## Release `v0.1.49`

Version bump and release metadata update for `v0.1.49`.

**Changelog draft:**
* Update release workflows for Node 24 actions
([#384](#384))
* Improve remote clone SSH failures
([#387](#387))
* Expose branch preview PHP fatals
([#388](#388))
* Improve docs social preview
* Heal remote clone branch boot dependencies
([#389](#389))

**Full changelog:**
v0.1.48...release/v0.1.49

## Next steps

1. **Review** the changes in this pull request.
2. **Push** any additional edits to this branch (`release/v0.1.49`).
3. **Merge** this pull request to publish `v0.1.49`.

Merging will automatically build ForkPress binaries, create a GitHub
release, and update the Homebrew formula.

Co-authored-by: Codex <codex@openai.com>
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.

2 participants