https://codingcomplete.com/wp-content/uploads/2020/04/github.png 1080 1080 Coding Complete https://codingcomplete.com/wp-content/uploads/2020/03/cclogo.png Coding Complete2020-04-03 08:36:452020-04-25 22:47:31How to connect to GitHub with SSH
Connecting to Github with SSH eliminate needs of entering username and password for git interactions. This post describes How to connect to GitHub with SSH.
Step 1. Initialize SSH key
$ cd ~/.ssh $ ssh-keygen -p # Start the SSH key creation process > Enter file in which the key is (/Users/you/.ssh/id_rsa): [Hit enter] > Key has comment '/Users/you/.ssh/id_rsa' > Enter new passphrase (empty for no passphrase): [Type new passphrase] > Enter same passphrase again: [One more time for luck] > Your identification has been saved with the new passphrase.
Step 2. Adding your SSH key to the ssh-agent
$ ssh-add ~/.ssh/id_rsa
Step 3. Adding a new SSH key to your GitHub account
$ cat ~/.ssh/id_rsa.pub
- Copy output of above
- In the upper-right corner of GitHub click your profile photo, then click Settings.
- In the user settings sidebar, click SSH and GPG keys.
- Click New SSH key or Add SSH key.
- Add description eg. your computer name
- Paste your key into the “Key” field.
- Click Add SSH key.