Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Setting up identities and SSH

Different author identities per folder

If I need different author identities per folder, I use config scopes:

[[--scope]]
--when.repositories = ["~/dev/work"]
[--scope.user]
email = "you@work.example"
username = "work-handle"

[[--scope]]
--when.repositories = ["~/dev/personal"]
[--scope.user]
email = "you@personal.example"
username = "personal-handle"

SSH keys

SSH keys stay in ~/.ssh/config, because jj uses Git for remote operations:

Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519_oss
  IdentitiesOnly yes

Host gerrit.example.com
  HostName gerrit.example.com
  User my-google-account
  IdentityFile ~/.ssh/id_ed25519_google
  IdentitiesOnly yes

If two accounts live on the same host, I use host aliases like github-oss and github-work, then put that alias in the remote URL.