Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do we need SSH keys in git?

Tags:

git

ssh

I am having a very little or no familiarity with git.I have been following a tutorial and there the person generate ssh keys, this was my first encounter with it. Prior to it, i was following the command written in the git or adding it directly by JetBrains ide. I know it should be encrypting the connection but when uploading to GitHub, it means I am making my code public. Then why encryption? Why going all these troubles in cmd.

like image 799
Alpit Anand Avatar asked Nov 07 '17 06:11

Alpit Anand


1 Answers

Why do we need SSH keys in git?

SSH keys identify the user that is interacting with the git remote repository.

I know it should be encrypting the connection but when uploading to GitHub, it means I am making my code public.

Not necessarily, there are private repositories in GitHub. Also, there are other hosting providers as well.

Why going all these troubles in cmd.

With SSH authentication you don't need to enter your credentials when interacting with the remote.

like image 127
1615903 Avatar answered Nov 15 '22 12:11

1615903