为本地设置GitHub SSH Key便于提交git

生成SSH Key

macOS进入terminal,Windows进入cmd 输入

ssh-keygen -t ed25519 -C "your_email@example.com"

其中的your_email@example.com为你的GitHub邮箱,可以在这里查看:

https://github.com/settings/emails

28375-nfa3z01u7v.png
The key fingerprint is:后面的就是你的SSH Key
或者直接打开Key文件复制内容,示例图片中的Key地址为

/Users/miababy/.ssh/id_ed25519.pub

提交SSH Key

登录github后进入新增SSH Key页面

https://github.com/settings/ssh/new

输入SSH Key与自定义标题后点击 Add SSH key 即可加入Key

Sitemap · Rss

津ICP备2021004480号-3