fix(mutagen): dial a sync-only SSH alias so the session can actually be created - #177
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mutagen sync listis empty and the log has 14 consecutiveSKIP: could not create sessionentries going back to the day the module landed. The sync has never once worked.Neither cause is in mutagen:
No agent. The private key isn't on disk (it lives in the Bitwarden agent), and launchd does not hand
SSH_AUTH_SOCKdown to its agents. From launchd, ssh has no identity at all and falls through to a password prompt that nothing can answer — henceunable to prompt: prompter not foundin the log.Forward collision.
Host mvrx-nolang-devcarries 26LocalForwards plusExitOnForwardFailure yes. Whenever a normal dev session already holds those ports, every further connection to that host exits 255. Reproduced by hand: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, andIdentityAgentpinned so it does not depend on the caller's environment.mutagen-sync.nixgains asshHostfield and dials that; the session name and~/Sync/<host>directory are unchanged.Verified before committing, with the forwarding session still up: