Clone a git repo using a specific SSH private key

If you wish to clone a repo using a set private key, you can use the following syntax to do just that and it won’t add the private key to your usual SSH settings:

 

Generating Public & Private Keys Using PHPSECLIB

A few tasks that I’ve been working on this weekend have needed public/private key pairs. The very useful phpseclib library provides the tools that you need to generate these within your application.