1、 安装 git
2、配置用户名、邮箱
vim ~/.gitconfig
修改配置并保存:
[user]
name = username
email = youremail@example.com
3、生成密钥:
ssh-keygen -t rsa -C "youremail@example.com"
三次回车后生成。
4、获取公钥:
cat ~/.ssh/id_rsa.pub
5、复制输出的公钥,粘贴到仓库的 SSH keys 中。
1、 安装 git
2、配置用户名、邮箱
vim ~/.gitconfig
修改配置并保存:
[user]
name = username
email = youremail@example.com
3、生成密钥:
ssh-keygen -t rsa -C "youremail@example.com"
三次回车后生成。
4、获取公钥:
cat ~/.ssh/id_rsa.pub
5、复制输出的公钥,粘贴到仓库的 SSH keys 中。
本文标题:Git 中 SSH Key 生成和配置
本文链接:https://www.haomeiwen.com/subject/xoslfftx.html
网友评论