将SSH密钥添加到GitHub的目的是什么? [英] What is the purpose of adding SSH keys to GitHub?

查看:245
本文介绍了将SSH密钥添加到GitHub的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读一本让我生成SSH密钥并将其添加到GitHub的书.这样做之后,该书仅声明我们已准备好创建一个存储库并向上推送我们的代码.我很困惑,因为我从来不需要这样做来增加我的代码.那么这有什么目的呢?

I am reading through a book that had me generate an SSH key and add it to GitHub. After doing so, the book simply states that we are ready to create a repository and push our code up. I am confused because I have never needed to do this to push up my code. So what purpose does this serve?

推荐答案

生成的ssh密钥使github可以验证您是推送代码的人,而不是其他可能有害的人.与手动输入用户名/密码相比,它们不那么麻烦且更安全.我不确定您以前如何使用github,但是SSH密钥是保护存储库的最佳实践,因此,我建议您以后继续使用此密钥.

The ssh key generated lets github verify you are the one pushing code and not someone else who might be malicious or otherwise. They are less cumbersome and more secure than manually entering a username/password as well. I'm not sure how you previously used github but SSH keys are best practice way to secure your repo so I would recommend you continue to use this key in the future.

这篇关于将SSH密钥添加到GitHub的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆