Home Connecting to GitHub with SSH
Post
Cancel

Connecting to GitHub with SSH

This tutorial get from Chairat Onyaem (Par) Blog.

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 ssh-keygen -t rsa -b 4096 -C "your_comment_or_email". Enter to accept default filename and input passphase as needed.
  3. Check if SSH is running withy command eval $(ssh-agent -s). You should see output like: Agent pid 4056
  4. Add the new SSH private key to SSH agent with command ssh-add ~/.ssh/id_rsa
  5. Copy the public key to the clipboard with command clip < ~/.ssh/id_rsa.pub
  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 ssh -T git@github.com. If everything works fine, you should see this message
    1
    
    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:

1
ssh-keygen -t rsa -b 4096 -C "your_comment" -f ~/.ssh/id_rsa -N "passphase"
This post is licensed under CC BY 4.0 by the author.
Contents

How to Change the PHP Version in Laradock

Add new columns as foreign key to existing table in Laravel