Git生产SSH密钥

打开GIT Bash,然后输入以下命令

1、配置用户名

git config --global user.name "xxx"

2、配置邮箱

git config --global user.email "xxxx@qq.com"

3、查看配置

git config -l

4、生成公钥和私钥

ssh-keygen -t rsa -C "xxxx@qq.com"

5、查看公钥

cat ~/.ssh/id_rsa.pub

6、复制步骤4显示出来公钥,然后去网站中设置SSH Keys即可

 

posted @ 2021-06-12 22:11  LDHeng  阅读(319)  评论(0)    收藏  举报