Skip to main content

Command Palette

Search for a command to run...

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

Updated
1 min read
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:

More from this blog

Mensah David Assigbi's personal IT blog

28 posts