Несколько Github аккаунтов на одной машине

# Создаем ключ. Например, /home/user/.ssh/id_rsa2
ssh-keygen -t rsa

# Создаем файл конфигурации
touch /home/user/.ssh/config
chmod 600 /home/user/.ssh/config

# Добавляем содержимое
Host git2
Hostname github.com
IdentityFile ~/.ssh/id_rsa2
IdentitiesOnly yes

# Клонируем репозиторий с заменой хоста github.com -> git2:
git clone git@git2:romkamix/repo.git

Добавить комментарий