生成本地.ssh:
一.需先设置user name 和email,如果没有就百度设置,如果有下一步;
二.生成SSH密钥过程:
1.查看是否已经有了ssh密钥:cd ~/.ssh 如果没有密钥则不会有此文件夹,有则备份删除;
2.生存密钥:$ ssh-keygen -t rsa -C "[email protected]"
按3个回车,密码为空。
Your identification has been saved in /home/tekkub/.ssh/id_rsa.
Your public key has been saved in /home/tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
然后会生成.ssh文件,下面有
id_rsa_pub就是key
3. 找到.ssh文件夹,用文本编辑器打开“id_rsa.pub”文件,复制内容到剪贴板。
4. 打开 https://github.com/settings/ssh ,点击 Add SSH Key 按钮,粘贴进去保存即可。
上传idea项目:这里不用ssh,详情看如何将idea本地已有的新项目完整提交到gitlab上