別の言い方をすれば、通常プル/プッシュに使用するデフォルト アカウントが 1 つあり、他のアカウントに変更をプッシュすることがある場合は、https
他のアカウントの URL を参照するリモートを.git/config
ファイルに追加できます。毎回 github パスワードを入力する必要があり、デフォルトの github アカウント (有効になっているキーに対応する) のみが ssh キーを使用します。
次のようなもの
[remote "origin"]
url = git@github.org:account1/repository.git
#This one uses the default ssh keys
[remote "account2"]
url = https://github.com/account2/repository.git
#This will need password while pushing/pulling
[remote "account3"]
url = https://github.com/account3/repository.git
#This will need password while pushing/pulling
その後、通常の操作では、sshキーを使用してプッシュ/プルできます
git pull origin branch_name
git push origin branch_name
https
また、他のアカウントリポジトリにプッシュするには、パスワードを使用してプッシュできます
git push account2 branch_name
git push account3 branch_name