Skip to content

Add gitswitch under *SSH* agent#89

Open
OfirHaim1 wants to merge 1 commit into
moul:masterfrom
OfirHaim1:add-gitswitch
Open

Add gitswitch under *SSH* agent#89
OfirHaim1 wants to merge 1 commit into
moul:masterfrom
OfirHaim1:add-gitswitch

Conversation

@OfirHaim1
Copy link
Copy Markdown

Adding gitswitch under ### *SSH* agent, alongside ssh-ident and sshecret which solve the same multi-identity problem from different angles.

* [gitswitch](https://github.com/target-ops/gitswitch) [![stars](https://img.shields.io/github/stars/target-ops/gitswitch.svg?style=social&label=stars)](https://github.com/target-ops/gitswitch) - Different SSH keys and git identities per directory, with a pre-commit hook that blocks wrong-author commits.

Why it fits this section

  • Adds per-account SSH host aliases with IdentitiesOnly yes so ssh-agent doesn't broadcast every key in your keychain to every host (the privacy concern that motivates ssh-ident's existence).
  • Plus binds git user.email/user.name/signing key + gh CLI account to the same directory, in lockstep, via a sentinel-marked includeIf block in ~/.gitconfig.
  • Plus a pre-commit hook (gitswitch guard) that refuses commits where the active email doesn't match the directory's bound identity — the structural fix for "I committed as the wrong person."

Single Go binary, MIT licensed, ~2 MB, no runtime dependencies. macOS arm64/x64, Linux x64/arm64, Windows.

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