githubの秘密鍵を指定してgit pullする
こんな感じで .ssh/config
に2つ登録したとする
// .ssh/config Host github.com.first HostName github.com IdentityFile ~/.ssh/id_rsa_first User git Host github.com.second HostName github.com IdentityFile ~/.ssh/id_rsa_second User git
秘密鍵を指定して git pull
したいときはこうする
$ git pull github.com.second:組織名/リポジトリ名
公式ドキュメントにも、ここにオプションを指定しなさいと書いてある
git pull [<options>] [<repository> [<refspec>…]]