废话不多说,直接配置,大量图片
配置Git
安装Git
没有安装的可参考我这篇git 2.29.2版本安装文档,其实主要是官网下载好安装包,然后一直next就可
配置秘钥
1.检查秘钥
- 查看秘钥是否存在
cat ~/.ssh/id_rsa.pub
桌面右键 > Git Bath 或
win > Git Bath
2.生成秘钥
如果不存在,那么执行生成秘钥命令,一路回车就好
ssh-keygen -t rsa -C 'your email'
3.gitlab添加秘钥
- 复制
id_rsa.pub
(公钥)文件中的秘钥
- 登录gitlab,头像 > Setting > SSH Keys
idea配置
1.添加git配置
- File > Settings > Version Control
- 版本控制,选择exe执行文件
- Test 成功会显示版本号
2.更新项目
方式一:
- File > New > Project from Version Control
方式二:
- VCS > Git > Clone
填写要更新的项目地址
可能会出现的报错
SSL certificate problem: self signed certificate
- 执行下方命令
//这也是查询网上的解决方式
git config --global http.sslVerify false
3.添加项目
- VCS > Create Git Repository