仕事とプライベートとで別々のGitアカウントを使用する必要が出てきた際に、プライベートと仕事での開発とで環境を切り替えがわりと面倒だったので、今後迷わないように記録する。 アカウントの新規作成(ざっくり) 1. 新しいメールアドレスでGithubアカウントを作る 2. sshキーを作る ~/.ssh/conifgファイルに下記の様なフォーマットで秘密鍵のパスを指定する。 Host github HostName github.com IdentityFile ~/.ssh/main_rsa User git Port 22 TCPKeepAlive yes IdentitiesOnly yes Host github-sub HostName github.com IdentityFile ~/.ssh/sub_rsa User git Port 22 TCPKeepAlive yes I