git change ssh key code example
Example 1: genrate shh key github
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
Example 2: git change ssh key
git config core.sshCommand "ssh -i ~/.ssh/id_rsa_example -F /dev/null"
git pull
git push
# Other way
edit .git/config file like:
[core]
sshCommand = ssh -i ~/.ssh/id_rsa_example -F /dev/null
Example 3: add ssh key to github
> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again]