- Open Git Bash.
- Paste the text below, substituting in your GitHub AE email address.
ssh-keygen -t rsa -b 4096 -C "[email protected]"
- Ensure the ssh-agent is running. You can use the "Auto-launching the ssh-agent"
# start the ssh-agent in the background
eval "$(ssh-agent -s)"
> Agent pid 59566
- Add your SSH private key to the ssh-agent. If you created your key with a different name, or if you are adding an existing key that has a different name, replace id_rsa in the command with the name of your private key file.
ssh-add ~/.ssh/id_rsa
- Add the SSH key to your account on GitHub. For more information
clip < ~/.ssh/id_rsa.pub
For Github:
git config --global --add url."[email protected]:".insteadOf "https://github.com/"
Enable GIT_TERMINAL_PROMPT
env GIT_TERMINAL_PROMPT=1
ssh -T [email protected]
On successful authentication you will get the below output.
> Hi your.user.name! You've successfully authenticated, but GitHub does not provide shell access.