You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BREAKING: replace XSH_GIT_HUB_ACCOUNT_MAP with XSH_GIT_HUB_ACCOUNTS; add hub/ssh
The env var schema changes from a flat email=account map to a list of
account profile records, each describing one gh account:
<account> : <email> : <org>[,<org>...]
This unifies what were two conceptually-coupled mappings (email->account
for identity, org->account for SSH routing) into one record-per-account
table that's plug-and-play per org file. There is no compatibility shim:
0.3.0 reads XSH_GIT_HUB_ACCOUNTS, not the previous variable. Update the
shell rc files seeding the var when bumping to this release.
New utilities:
hub/account-for-org New sibling of account-for-email; returns the
account that defaults for a given GitHub org.
First-match-wins for orgs claimed by more than
one record.
hub/ssh New script (under scripts/, symlinked into
/usr/local/bin/git-hub-ssh on xsh imports).
Designed for core.sshCommand: parses the org
from git's git-{upload,receive}-pack arg,
looks it up in XSH_GIT_HUB_ACCOUNTS, exec's
ssh with -i ~/.ssh/github-<account> and
IdentitiesOnly=yes. Falls through to plain ssh
for non-github hosts and unmapped orgs.
The router lets bare git@github.com:<org>/<repo>.git URLs work directly
without needing url.<base>.insteadOf rewrites in gitconfig — cloned
remote stays as the natural bare URL.
Tests cover the new record format, the new utilities, and the
fake-ssh-on-PATH harness for git/hub/ssh.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments