How to specify custom ssh key while git clone from github

If you need to provide some custom ssh key while cloning your repository from github (or pulling, whatsoever), run this command:

ssh-agent $(eval `ssh-agent -s`; ssh-add ~/.ssh/{your-custom-keyfile}; git clone{username}/{repo-name}.git .)

Please note, you should replace `{strings}` with plain string values!

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

Ваш e-mail не будет опубликован. Обязательные поля помечены *