Skip to content

fix(mutagen): dial a sync-only SSH alias so the session can actually be created - #177

Merged
gapul merged 1 commit into
mainfrom
fix/mutagen-ssh-alias
Aug 9, 2026
Merged

fix(mutagen): dial a sync-only SSH alias so the session can actually be created#177
gapul merged 1 commit into
mainfrom
fix/mutagen-ssh-alias

Conversation

@gapul

@gapul gapul commented Aug 9, 2026

Copy link
Copy Markdown
Owner

mutagen sync list is empty and the log has 14 consecutive SKIP: could not create session entries going back to the day the module landed. The sync has never once worked.

Neither cause is in mutagen:

  1. No agent. The private key isn't on disk (it lives in the Bitwarden agent), and launchd does not hand SSH_AUTH_SOCK down to its agents. From launchd, ssh has no identity at all and falls through to a password prompt that nothing can answer — hence unable to prompt: prompter not found in the log.

  2. Forward collision. Host mvrx-nolang-dev carries 26 LocalForwards plus ExitOnForwardFailure yes. Whenever a normal dev session already holds those ports, every further connection to that host exits 255. Reproduced by hand:

    $ ssh mvrx-nolang-dev 'echo hello'
    bind [127.0.0.1]:18100: Address already in use
    Could not request local forwarding.
    $ echo $?
    255
    

    So even with a working agent, the sync would break exactly when the machine is in use.

Fix

A sync-only alias in the sops-managed ssh_config: mvrx-nolang-dev-sync, same host, no forwards, and IdentityAgent pinned so it does not depend on the caller's environment. mutagen-sync.nix gains a sshHost field and dials that; the session name and ~/Sync/<host> directory are unchanged.

Verified before committing, with the forwarding session still up:

$ ssh -F <new config> mvrx-nolang-dev-sync 'echo REMOTE_OK; hostname'
REMOTE_OK
sean

…be created

The session had never come up. Two things blocked it, and both live in the SSH entry
rather than in mutagen: launchd hands down no SSH_AUTH_SOCK, and the interactive entry
carries LocalForward with ExitOnForwardFailure, which makes every second connection
exit 255 while a normal session holds those ports.
@gapul
gapul enabled auto-merge (squash) August 9, 2026 09:10
@gapul
gapul merged commit d83a184 into main Aug 9, 2026
3 checks passed
@gapul
gapul deleted the fix/mutagen-ssh-alias branch August 9, 2026 09:18
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