清华大学开源镜像网站 https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/
Gitlab Community Edition 镜像使用帮助
注意: gitlab-ce 镜像仅支持 x86-64 架构
Debian/Ubuntu 用户
首先信任 GitLab 的 GPG 公钥:
curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null
再选择你的 Debian/Ubuntu 版本,文本框中内容写进 /etc/apt/sources.list.d/gitlab-ce.list
你的Debian/Ubuntu版本: Debian 7 (Wheezy) Debian 8 (Jessie) Debian 9 (Stretch) Ubuntu 14.04 LTS Ubuntu 16.04 LTS
deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial main
安装 gitlab-ce:
sudo apt-get update
sudo apt-get install gitlab-ce
RHEL/CentOS 用户
新建 /etc/yum.repos.d/gitlab-ce.repo
,内容为
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
再执行
sudo yum makecache
sudo yum install gitlab-ce
安装完后,修改
/etc/gitlab/gitlab.rb
将 其中
external_url ‘
引号中的地址改成你环境的地址,比如 ‘192.168.10.116:81’
(if 192.168.10.116 is the ip you install gitlab.)
最后执行
sudo gitlab-ctl reconfigure
gitlab启动成功,然后在浏览器访问刚才设置的external_url