Skip to content

gitlab服务搭建配置

李志强 edited this page Aug 14, 2017 · 2 revisions

ubuntu16.04 安装gitlab

1. sudo apt-get install curl openssh-server ca-certificates postfix
2. curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
3. sudo apt-get install gitlab-ce (若下载失败,直接去官网下载安装包手动安装, 官方教程中有下载链接)
4. 编辑gitlab配置文件/etc/gitlab/gitlab.rb 修改相关字段如下:
   # gitlab外部url地址
   external_url 'http://127.0.0.1:9001    
   # 支持md文件下载
   nginx['custom_gitlab_server_config'] = "location ~ ^/[^a][^p][^i].*\\.md$ {\n proxy_cache gitlab;\n proxy_pass  http://gitlab-workhorse; \n add_header Access-Control-Allow-Origin '*';\n}\n"
5. gitlab-ctl reconfigure
6. 浏览器访问external_url(第四步设置),按照界面提示设置管理员密码,并登陆,
7. 在管理员账号设置中,生成accessToken(非private token), 替换keepwork的gitlab配置信息中 host(external_url), token(accessToken)即可

官方教程

https://about.gitlab.com/installation/#ubuntu

Gitlab cluster

details

Clone this wiki locally