Image for post
Image for post

Here is the quick guide to push/pull GitHub repository via SSH connection based on the instructions on GitHub Help

  1. Open Git Bash
  2. Generate a new SSH key, use command . Enter to accept default filename and input passphase as needed.
  3. Check if SSH is running withy command . You should see output like:
  4. Add the new SSH private key to SSH agent with command
  5. Copy the public key to the clipboard with command
  6. Go to GitHub SSH and GPG keys setting
  7. Click New SSH, name Title for your reference, and paste into the Key
  8. Click Add SSH Key
  9. Test connection with command . If everything works fine, you should see this message

Hi …! You’ve successfully authenticated

Now, you should be able to connect to GitHub via SSH.

Additional Tips

To generate SSH key files without prompt, use:

ssh-keygen -t rsa -b 4096 -C "your_comment" -f ~/.ssh/id_rsa -N "passphase"

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store