# account_1
Host gitlab.com-account_1
HostName gitlab.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_account_1
Учетная запись 2 # Account2
Host gitlab.com-Account2
HostName gitlab.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_Account2
Учетная запись 3 # Account_3
Host github.com-Account3
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_Account_3
git remote add origin git@gitlab.com-account_1:group_name/repo_name.git
Учетная запись 2 git remote add origin git@gitlab.com-Account2:group_name/repo_name.git
Учетная запись 3 git remote add origin github.com-Account3:github_username/repo_name.git
Убедитесь, что имена IdentityFile такие же, как вы создали во время генерации ключа ssh.
blockquote>