1.
First, generate a SSH key in your ~/.ssh directory using following command:
ssh-keygen

Nothing but only press “Enter” every time it asks for options or passwords. No need to give password / passphrase

When key is created , you’ll find the key in you home directory’s .ssh folder.

Now if you go to ~/.ssh folder, you’ll see two files id_rsa , id_rsa.pub .

Note: Never share id_rsa file with anyone. You are only allowed to share id_rsa.pub file.

2.
Now go to your git settings page and add your id_rsa.pub key in git. You are done !