Note: Replace USER_NAME
with your username.
In this scenario we assume that we use two different GIT repos:
- Run
ssh-keygen -t rsa -C "[email protected]"
- Enter file name (and path), e.g.
C:\Users\USER_NAME\.ssh\id_rsa_github
- Type in a passphrase (use a secure, long passphrase)
- Confirm passphrase
- Re-do step 1 to 4 for
id_rsa_azure
If you have cygwin installed:
clip < C:\Users\USER_NAME\.ssh\id_rsa_github
(for the GitHub RSA public key)- Paste it in the GitHub settings, do the same for the Azure environment
Otherwise:
- Open
C:\Users\USER_NAME\.ssh\id_rsa_github.pub
with an editor - Select all content and copy/paste it in the GitHub settings, do the same for the Azure environment
- Open
C:\Users\USER_NAME\.ssh\config
with an editor - Add following lines:
Host github.com
HostName github.com
IdentityFile C:\Users\USER_NAME\.ssh\id_rsa_github
Host ssh.dev.azure.com
HostName ssh.dev.azure.com
IdentityFile C:\Users\USER_NAME\.ssh\id_rsa_azure
- Done