Gitlab CE


语法验证,可以在项目对应的目录/gitlab-org/project-123/-/ci/lint 进行验证

配置完成后,需要对应的Gitlab Runner配合执行.gitlab-ci.yml文件中对应的任务。runner 官方文档


sudo apt-get install -y curl openssh-server ca-certificates
sudo apt-get install -y postfix
curl -sS | sudo bash
sudo EXTERNAL_URL="http://your.domain:port" apt-get install gitlab-ce

Reading state information... Done
The following packages were automatically installed and are no longer required:
  libopts25 sntp
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 50 not upgraded.
Need to get 742 MB of archives.
After this operation, 1,927 MB of additional disk space will be used.


502 Whoops, GitLab is taking too much time to respond

看起来我的小破机器跑不起来gitlab的。GitLab requires at least 2GB RAM + 2GB swap memory

手动安装,下载deb包之后,执行sudo EXTERNAL_URL="http://your.domain:port" dpkg -i gitlab-ce_12.6.2-ce.0_amd64.deb即可。

manual install

#Turn off all swap processes
sudo swapoff -a

#Resize the swap
sudo dd if=/dev/zero of=/swapfile bs=1G count=8
#if = input file
#of = output file
#bs = block size
#count = multiplier of blocks

#Make the file usable as swap
sudo mkswap /swapfile

#Activate the swap file
sudo swapon /swapfile
#Check the amount of swap available
grep SwapTotal /proc/meminfo




# Start all GitLab components
sudo gitlab-ctl start

# Stop all GitLab components
sudo gitlab-ctl stop

# Restart all GitLab components
sudo gitlab-ctl restart

# check log 
sudo gitlab-ctl tail