ssh key to your
github will allow you to access repositories via
ssh rather then
Generating SSH Key Pair
Open a terminal and type –
sudo ssh-keygen -t rsa -b 4096 -C "A comment to identify this key"
-C stands for
comment. It’s a common practice to use an email address here but you can put anything to identify this
This command should invoke an interactive process for user inputs for the storage and
pass-phrase protect your secret key. If the default settings are used, this should create a
RSA key pair in the
Adding SSH Key to GitHub
Go to GitHub and loginto your acount. Go to
SSH and GPG Keys from the left menu.
New SSH Key. Once the new page opens, add a
Title for the ssh key. Choose something easy to remember and easy to identify this ssh key.
go back to the terminal window and extract the content of the
public key. It’s usually saved as
id_rsa.pub. Considering the keys are saved in
Copy the content of the public key and go back to
GitHub and paste the content under
Key and press
Add SSK Key.
If GitHub doesn’t show any error then the SSH key has been added successfully. You can see the newly added ssh key listed under
SSH and GPG Keys in the
settings menu now.