GUIDE

The road ahead will be long and our climb will be steep

Multiple Ssh Key Add in Difference Github Account

| Comments

Question

First computer: I have added id_ras.pub to CBluowei account.

Seconed computer: I have added another id_ras.pub to luoguanzhong account.

I want push luoguanzhong’s project on first computer. ## Resolve

  • config the ~/.ssh/config.
1
2
3
4
Host lgz.github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_office
  • replace git remote origin from git@github.com/luoguanzhong/xxx.git to git@lgz.github.com/luoguanzhong/xxx.git

  • then I can push xxx project on First computer.

  • use ssh -T git@lgz.github.com to verify.

Comments