git生成并添加SSH key

1、安装Git Bash

https://git-scm.com/downloads

2、鼠标右键git bash here

 

3、执行以下命令:

①   cd ~/.ssh/    【如果没有对应的文件夹,则执行  mkdir  ./.ssh】

②  git config --global user.name "xb12369"

③  git config --global user.email "1234@qq.com"

④  ssh-keygen -t rsa -C "1234@qq.com"

 

4、找到C:\Users\xb12369\.ssh 目录,里面有两个文件:id_rsa和id_rsa.pub

5、配置ssh【这里是id_rsa.pub里面的内容啊】

 

配置好了后,就可以commit && push

 

将idea和git进行关联

 

 

 



posted @ 2019-06-28 22:09  夏威夷8080  阅读(240)  评论(0编辑  收藏  举报