搭建项目开发环境(六)—— 在IDEA中集成私有库Gitlab

4,064 阅读1分钟

IDEA中集成Gitlab插件

IDEA默认是没有集成Gitlab的,需要用插件。

在File-setting-plugin中输入gitlab搜索如下

image.png

选择gitlab project 2020,install

安装完毕后,点击菜单栏File->Settings,点击Version Control->GitLab菜单

image.png

将### 搭建项目开发环境(五)—— 安装私有代码库(Gitlab)中,配置好的Gitlab私有库信息填入。

其中的Personal Access Token在gitlab中生成

image.png

gitlab的配置完成

将本地Project发布到gitlab私有库中

在IDEA中打开一个本地Project(httpd-doorweb),这是一个静态网页工程。

选择VCS-share project on gitlab菜单项。

image.png

填写gitlab的信息 image.png

这里有个坑需要注意,Auth Type要选择HTTP,否则必须配置SSH KEY,如果没配置会在push时授权错误 在gitlab中有说明:You won't be able to pull or push repositories via SSH until you add an SSH key to your profile