How to specify a private SSH-key to use when executing git command?

There is no direct option available in git to specify a private key while executing git command. You can configure git config file or use the below hack to specify the private SSH-key to use when executing git command.

Leave a Reply