Trying to work on my both my actual \"work\" repos, and my personal repos on git hub, from my computer.
The work account was set up first, and everything works flawl
Open config file & add below codes. (change according to your account)
Account 1
# account_1
Host gitlab.com-account_1
HostName gitlab.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_account_1
Account 2
# Account2
Host gitlab.com-Account2
HostName gitlab.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_Account2
Account 3
# Account_3
Host github.com-Account3
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_Account_3
Add remote url as follows
Account 1
git remote add origin git@gitlab.com-account_1:group_name/repo_name.git
Account 2
git remote add origin git@gitlab.com-Account2:group_name/repo_name.git
Account 3
git remote add origin github.com-Account3:github_username/repo_name.git
Make sure that IdentityFile names are same as you created during ssh key generation.