Skip to main content

How to use "git clone" with a custom SSH key

Published 1 min readMarkdown
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_custom" git clone git@github.com:user/repo.git your-folder-name

`~/.ssh/config`

Host github_ssh_connection
   HostName github.com
   IdentityFile ~/.ssh/id_rsa_custom
git clone git@github_ssh_connection:user/repo.git your-folder-name

Resources:

No comments yet. Be the first to comment.

More from this blog