Custom ssh key for git command
![Custom ssh key for git command](/content/images/size/w2000/2021/01/maria-ziegler-jJnZg7vBfMs-unsplash.jpg)
Assume the private key location is in /home/transang/custom-key.pem
. Use this command to specify the key.
GIT_SSH_COMMAND='ssh -i /home/transang/custom-key.pem' git@github.com:transang/my-repo.git
![Buy Me A Coffee](https://cdn.buymeacoffee.com/buttons/v2/default-red.png)
Assume the private key location is in /home/transang/custom-key.pem
. Use this command to specify the key.
GIT_SSH_COMMAND='ssh -i /home/transang/custom-key.pem' git@github.com:transang/my-repo.git