I’d like to use multiple Git server accounts (with any of GitHub, GitLab, BitBubket etc.).
The accounts are distinguished by their email addresses, firstname.lastname@example.org and
email@example.com and git is setup to use these addresses in the relevant
The following constraints apply to the ‘change-account workflow’:
- Without touching/changing SSH config files (e.g.
~/.ssh/config, etc.) when
repositories or servers are added/removed/changed.
- Without requiring SSH agent running i.e. no
- Without changing environment variables.
- Without changing the
git clone <address>instruction.
- Use the same ‘change-account workflow’ across all private and public repositories.
- The ‘change-account workflow’ is a one (1) step/command.
- The ‘change-account workflow’ is one (1) time per repository (i.e. not each
time you move into work on the repository).
The initial repository setup (which is also one time activity) can involve more than
Any conventions/assumptions are acceptable as long as they don’t break the
These are responses that do not satisfy the constraints.
They generally require changes to
~/.ssh/config and/or involve the SSH agent daemon: