简体   繁体   中英

Why do we need SSH keys in git?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM