

Step 2: Git directory structureĭifferent directory structures are possible. The baseline for setting the SSH-keys is already described in the second paragraph.
Gitbox multiple accounts full#
Url = +refs/heads/*:refs/remotes/origin/*Īltough this is a good solution, and it gives you full flexibility on the working directory, the alternative option simplifies it even further without touching the ~/.ssh/config file and setting the specific remote origin for each repository. See the template and example of the named section below on what to add for your new git-provider.Ī template of a named (git account) section in the ~/.ssh/config file: Step 2: Add a named SSH-sectionįor this step you need to modify the SSH-configuration file ( ~/.ssh/config). The basic steps to set up a new git-provider: The following diagram describes the configuration for a new git account: Diagram for the named SSH configuration flow This method gives you full flexibility on the location of your local repositories. The name of the entry is used in the git configuration’s remote origin. The entry content refers to the git-provider specific SSH-keys. In this method a “named” entry is created in the. If for some reason your workstation is no longer available, you can identify and disable the SSH-keys at your git-provider. I re-use my SSH-keys for a specific git account per computer but not shared across computers. It helps to identify the SSH-keys at your git-provider. Ssh-keygen -t ed25519 -f -C best practice add a comment ('-C' argument) with your git-user.name and the computer-name. ed25519, instead of the default RSA key I use Ed25519 1.git-provider, the name of the git provider, including domain to separate possible internal and external git providers.The naming convention used for the SSH-keys is git-user.name, the user name at your git provider. The SSH-keys are stored by default in the directory ~/.ssh/. The upload process is different for each provider.

