Skip to content

Windows machines: herdr-core over Git Bash, and pairing there - #108

Closed
puchedev wants to merge 4 commits into
makefunstuff:mainfrom
puchedev:windows-machines
Closed

puchedev wants to merge 4 commits into
makefunstuff:mainfrom
puchedev:windows-machines

Conversation

@puchedev

@puchedev puchedev commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

The app can now reach a Windows PC running the Herdr desktop app's herdr-core, over OpenSSH Server with Git for Windows' Bash as its shell. herdr-push pair also runs there, so a Windows PC is paired with the QR code like any other machine.

What changes

  • HcDetection: the probe recognises Git Bash (uname -s is MINGW*, MSYS* or CYGWIN*), asks hc server status (there is no socket path to read on Windows) and talks to herdr-core with hc connect. Linux and macOS take the same path as before.
  • herdr-push pair on Windows: reads the host keys and sshd_config in C:\ProgramData\ssh; for a user in Administrators, while the stock Match Group administrators block is there, writes to administrators_authorized_keys (which needs a terminal opened as administrator); writes the one-time key's command with forward-slash paths for Bash; locks with msvcrt where there is no fcntl; finds Tailscale's CLI in %ProgramFiles%\Tailscale when sshd's PATH predates its install. herdr-push goes to version 12; on Windows only pair runs in this change.
  • README ("A Windows machine") and the pairing screen: the one-time setup (DefaultShell) and that the interpreter there is usually python.

Checks

  • ./gradlew -p core test: 609 tests. I ran them on Windows, where 52 tests already fail on main (Java's quoting of sh -c, the Microsoft Store's python3); the same ones fail here and no others; DictationTest's timing test failed once under load and passes on its own. Linux CI is the real check. New cases in HerdrCoreTest run the real probe script with a fake uname and a fake core.
  • ./gradlew :app:testDebugUnitTest: 93 tests; the 13 that fail on main on Windows (file renames, RoutesTest) fail here too, no others.
  • By hand on Windows 11 (OpenSSH 9.5, Git Bash, herdr-core 0.1.18) with a phone: paired with the QR code (LAN and Tailscale addresses), Agents, Terminal and the task list work.

Shots

Dark; light ones beside them in docs/screenshots/windows-machines/ on the pr-shots/windows branch of my fork.

before: add-machine after: add-machine

Part of a series that makes a Windows PC a full herdr machine. Chat (#113), health (#114) and notifications (#115, stacked on this one) on Windows need it to reach the PC; the Python lookup (#110), search (#111) and the brief (#112) with herdr-core alone, and a port-forward crash (#109) stand on their own.

🤖 Generated with Claude Code

puchedev and others added 4 commits November 7, 2026 21:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tailscale's installer adds its folder to the system PATH, but sshd and every
shell already open keep the old PATH until restarted, so `pair` missed the
Tailscale name and address and the code carried only the local network one.
Fall back to %ProgramFiles%\Tailscale\tailscale.exe on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pairing screen and the README say Windows' interpreter is usually
python, and the README's Windows paragraph names what herdr-core gives
there rather than a list of screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
makefunstuff added a commit that referenced this pull request Nov 8, 2026
…#108, #117)

puchedev's #108, with PushTest comparing the status's version to the bundled herdr-push's.

Co-authored-by: Manuel Puche <229537713+puchedev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@makefunstuff

Copy link
Copy Markdown
Owner

Merged through #117, thank you @puchedev! The app can now reach a Windows PC's herdr-core over Git Bash, and herdr-push pair works there too, including the administrators' keys file. One test still expected herdr-push version 11, so I fixed that on our side and kept you as co-author of the commit.

makefunstuff added a commit that referenced this pull request Nov 8, 2026
puchedev's #115, merged onto main after #108 (#117).

Co-authored-by: Manuel Puche <229537713+puchedev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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