Step 1 – How to generate a ssh key pair?
$ ssh-keygen -t rsa -C “devops@RajeshKumar.xyz”
Step 2 – Upload 2 different public key in 2 github accounts.
Step 3 – Lets say, the github account name is myaccount1 or myaccount2 when pushing to GitHub, you will need to create aliases for git@github.com in ~/.ssh/config, such as:
Host github-myaccount1
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_dsa-myaccount.pub
Host github-myaccount2
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_dsa-myaccount2.pub
How to validate which user is set?
ssh -T git@github.com
Git Tutorials | Github Tutorials | Git using Github Crash Course
Git fundamental using github crash tutorials may 2020 – By DevOpsSchool
Latest posts by Rajesh Kumar (see all)
- Best AI tools for Software Engineers - November 4, 2024
- Installing Jupyter: Get up and running on your computer - November 2, 2024
- An Introduction of SymOps by SymOps.com - October 30, 2024