How to Specify the Private Ssh-Key to Use When Executing Shell Command on Git? When executing Git commands that require SSH authentication, such as cloning a repository or pushing changes, you may need to specify a private SSH key to use.