I'm assuming you're familiar with git and it's trying to use SSH keys to access your repos and have multiple github accounts, lets say a personal a acc and a business acc.
ssh-keygen -t ed25519 -C "[email protected]"
- Copy the contents of your .pub file
- Paste the contents and save
Copy the generated key and key.pub into your Windows/linux .ssh folder under your O.S user profile folder:
- windows: %userprofile%/.ssh (if not exists, create the .ssh folder)
- linux: ~/.ssh
In order to use multiple accounts/keys you'll have to use "domain alias" to specify a target key.
A common clone command looks like: git clone [email protected]:[user_name]/[repo_name].git
A "domain alias" is the @github.com after git.
The file name is "config" without extensions inside the .ssh folder.
# Comment to identify your account 1
Host github-acc-1
HostName github.com
User git
IdentityFile ~/.ssh/[your key file name without .pub]
IdentitiesOnly yes
# Comment to identify your account 2
Host github-acc-1
HostName github.com
User git
IdentityFile ~/.ssh/[your key file name without .pub]
IdentitiesOnly yes
git clone git@github-acc-1:[user_name]/[repo_name].git