Issue #514

Generate SSH keys

ssh-keygen -t rsa -C "onmyway133@gmail.com" -f "id_rsa_github"
ssh-keygen -t rsa -C "onmyway133bitbucket@gmail.com" -f "id_rsa_bitbucket"

pbcopy < ~/.ssh/id_rsa_github.pub
pbcopy < ~/.ssh/id_rsa_bitbucket.pub

ssh-add -D
ssh-add id_rsa_github
ssh-add id_rsa_bitbucket
vim ~/.ssh/config

#Github (personal)
  Host gh
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_github

#Bitbucket (work)
  Host bb
  HostName bitbucket.org
  User git
  IdentityFile ~/.ssh/id_rsa_bitbucket

Config

git config --global user.email "onmyway133@gmail.com"
git config --local user.email "onmyway133bitbucket@gmail.com"

Read more


Updated at 2020-10-04 06:52:07