Skip to content

docs: fix push-to-server.cmd for Cygwin rsync (bundled ssh, known_hosts, *.tmp) - #74

Merged
mspinola merged 1 commit into
mainfrom
claude/cotdata-cwrsync-ssh-recipe
Jul 27, 2026
Merged

mspinola merged 1 commit into
mainfrom
claude/cotdata-cwrsync-ssh-recipe

Conversation

@mspinola

Copy link
Copy Markdown
Owner

What

Fixes the push-to-server.cmd example (Windows -> Linux dash rsync push) with the working recipe from an actual rollout. Follow-on to #72.

Why

Setting up the real Windows -> VPS push hit three issues the example would have led the next person straight into:

  1. Cygwin rsync + native Windows OpenSSH is broken. choco install rsync gives a Cygwin rsync; if it drives C:\Windows\System32\OpenSSH\ssh.exe, it corrupts rsync's binary stream and dies with connection unexpectedly closed (0 bytes received so far) — even though a plain ssh host "echo ok" works. It must use the ssh that ships with rsync (...\lib\rsync\tools\bin\ssh.exe). The old script used bare ssh, which grabs the native one.
  2. That bundled Cygwin ssh has no HOME, so it can't write the default known_hosts (Failed to add the host ... (/known_hosts)). Needs an explicit writable -o UserKnownHostsFile=.
  3. Partial-write temps (*.tmp from cotdata's atomic os.replace) would propagate. Now excluded.

Changes

  • docs/examples/windows/push-to-server.cmd: add an SSH_EXE marker (bundled Cygwin ssh) with a comment explaining the 0-byte failure; add UserKnownHostsFile; add --exclude "*.tmp"; correct the install path to the choco layout (C:\ProgramData\chocolatey\...) and note where the matching ssh lives.
  • docs/SYNCING.md: add a "cwRsync gotcha" bullet to the Dash store section and mention the *.tmp exclusion.

Docs only; no code changes. Verified end-to-end against the live dash VPS.

🤖 Generated with Claude Code

Rolling out the Windows->Linux dash push surfaced three issues the example
script would have walked the next person straight into:

- A Cygwin rsync (`choco install rsync`) driving the native Windows OpenSSH
  corrupts rsync's binary stream and dies with "connection unexpectedly closed
  (0 bytes received so far)", even though plain `ssh host echo ok` works. It must
  use the ssh that ships with rsync. Add an SSH_EXE marker and say why.
- That bundled Cygwin ssh has no HOME, so it can't write the default known_hosts
  ("Failed to add the host ... (/known_hosts)"). Add an explicit writable
  UserKnownHostsFile.
- Exclude *.tmp so a producer's partial-write temp (atomic write via os.replace)
  never propagates.

Also correct the install path to the choco layout
(C:\ProgramData\chocolatey\...) and note the matching bundled ssh location, and
add a "cwRsync gotcha" bullet to SYNCING.md's Dash store section.

Docs only; no code changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mspinola
mspinola merged commit 1be3234 into main Jul 27, 2026
5 checks passed
@mspinola
mspinola deleted the claude/cotdata-cwrsync-ssh-recipe branch July 27, 2026 16:07
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