Add ssh access to github

Github retired support for password access to github account mid 2021. This leaves developers with two options to access their remote github repos, namely ssh keys and tokens. In this article, we will be exploring the ssh key option.

How to configure ssh keys

1 Generate the ssh key

$ ssh-keygen -t rsa -b 4096

2 Access the ssh key.

$ cat ~/.ssh/id_rsa.pub

3 Copy the public ssh key displayed in your terminal.

Add ssh key to github.

1 Login to github

2 Select the github account avatar.

3 Choose the settings menu icon

4 Click on ssh and Gpg keys.

5 Click on New ssh key

6 Give a label to the new ssh key

7 Paste the key in the text area and save.

8 You can now push your code to github without password

git push -u origin branch name