Clone git repository with specific SSH Key and User

Clones a git repository given a specific SSH Key Path and configures it to use the desired Name and Email

Authored by: charlieVader
Brought to you by Warp, a free terminal reimagined to work like a modern app.
sshKeyPath
repositoryUrl
targetFolder
userName
userEmail

Command
Copy
git -c core.sshCommand='ssh -i ~/.ssh/id_rsa -o IdentitiesOnly=yes' clone <repo_url> <target_folder> cd <target_folder> git config core.sshCommand 'ssh -i ~/.ssh/id_rsa' git config user.name "Jhon Doe" git config user.email johndoe@example.com
Tags