Skip to content

Instantly share code, notes, and snippets.

@rodrigomelo9
Last active February 3, 2022 15:40
Show Gist options
  • Save rodrigomelo9/0274b7e7f87e327a1e06a10e4a2bd66c to your computer and use it in GitHub Desktop.
Save rodrigomelo9/0274b7e7f87e327a1e06a10e4a2bd66c to your computer and use it in GitHub Desktop.
git with a new ssh key
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example" git clone example
cd example
git config core.sshCommand 'ssh -i ~/.ssh/id_rsa_example'

It is normally useful when you need a new user, so probably a new email, so in the repo directory:

$ git config user.email "new@email.com"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment