How to Use Multiple GIT Accounts
But I wanted to find a way which I can use both office GIT server login and my GitHub login. After doing some searching on google I found a solution to that. For that we'll have to create ssh config file. So I created following config file at my .ssh folder
vi ~/.ssh/config
# hms-git
Host hms-git
HostName git.myoffice.com
User git
IdentityFile /home/sandarenu/.ssh/id_rsa
# github
Host github.com
HostName github.com
User git
IdentityFile /home/sandarenu/.ssh/id_rsa_github
Once this config file is saved I could clone office git projects usinggit clone git@hms-git:myproject
To clone GitHub project I could use
git clone git@github.com:sandarenu/task_tracker.git