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

```bash
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_custom" git clone git@github.com:user/repo.git your-folder-name
```

**\`~/.ssh/config\`**

```apache
Host github_ssh_connection
   HostName github.com
   IdentityFile ~/.ssh/id_rsa_custom
```

```bash
git clone git@github_ssh_connection:user/repo.git your-folder-name 
```

Resources:

* [https://ralphjsmit.com/git-custom-ssh-key](https://ralphjsmit.com/git-custom-ssh-key)
