github 私有化部署_用GitLab搭建自己的私有GitHub
用GitLab搭建自己的私有GitHub
现在git是开发人员的必备技能之一,github的代码仓库管理系统目前是最好的,下面搭建私有github系统的过程。
下载gitlab:
官网地址:https://about.gitlab.com/install/
Download a GitLab Omnibus package (recommended installation)
安装gitlab:
点击对应操作系统图标可以看到详细的安装步骤教程。
===============
sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates
sudo apt-get install -y postfix
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
Next, install the GitLab package. Change https://gitlab.example.com to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL.
sudo EXTERNAL_URL="https://gitlab.example.com" apt-get install gitlab-ee
sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld
安装Postfix 邮件通知功能
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
2. Add the GitLab package repository.
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ee
==============
之后就可以直接使用浏览器访问 http://ip 登录管理
个性化配置 和 注意事项
使用自己的nignx:
$ apt-get install nginx #安装nginx
$ cd /etc/nginx/conf.d && touch gitlab-http.conf
Nginx gitlab-http.conf 配置:
upstream gitlab-workhorse {
#server unix:/var/opt/gitlab/gitlab-workhorse/socket;
server 127.0.0.1:8080;
}
upstream gitlab-git-http-server {
server 127.0.0.1:8181;
}
server {
listen *:80;
server_name gitlab.guowei.com;
root /opt/gitlab/embedded/service/gitlab-rails/public;
client_max_body_size 0;
location / {
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_pass http://gitlab-workhorse;
}
location ~ [-\/\w\.]+\.git\/ {
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://gitlab-git-http-server;
}
location ~ ^/[\w\.-]+/[\w\.-]+/repository/archive {
client_max_body_size 0;
error_page 418 = @git-http-server;
return 418;
}
location @git-http-server {
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://gitlab-git-http-server;
}
}
配置gitlab不使用nginx:
$ vim /etc/gitlab/gitlab.rb
# search nginx find nginx['enable'] = true
# add
nginx['enable'] = false
gitlab_git_http_server['listen_network'] = "tcp"
gitlab_git_http_server['listen_addr'] = "127.0.0.1:8181"
# nginx['enable'] = true
$ gitlab-ctl reconfigure #配置gitlab
$ gitlab-ctl restart #重启服务
卸载gitlab:
# Stop gitlab and remove its supervision process
sudo gitlab-ctl uninstall
# Debian/Ubuntu
sudo dpkg -r gitlab-ce
# Redhat/Centos
sudo rpm -e gitlab-ce
注意事项:
为了方便以http的方式操作git仓库,在nginx中有个8181端口的配置(对应gitlab.rb中的gitlab_git_http_server配置)
下载仓库代码问题,有的可以下载,有的不可以下载
主要是国外的库问题,可以配置下本地源加快下载速度和成功率
github 私有化部署_用GitLab搭建自己的私有GitHub相关推荐
- github 私有化部署_项目私有化部署
文章来自:CrapApi --API接口管理系统,转载请注明出处! CrapApi所有演示系统(官网.试用)及数据库均使用阿里云服务器,为了保证系统安装顺利,建议购买阿里云Centos系统服务器:ht ...
- Gitlab 搭建本地局域网私有仓库
Gitlab 关于Gitlab,首先需要厘清下面相关概念: Git是版本控制工具 GitServer是远程管理仓库,没有界面,只能使用命令行 Gitlab是私有代码库Web管理工具 Github相当于 ...
- typora绑定github博客_零基础搭建个人博客
因为懒得再写一遍了,所以直接复制过来了,建议直接去文章地址查看 文章链接: https://hmoumou.xyz/2020/08/14/shi-yong-github-pages-hexo-da-j ...
- 100+文档格式预览,私有化部署,10分钟搭建专属IM
即时通讯是已经深入到我们的工作.学习和工作中,用户数量节节高升. <中国即时通信市场现状深度分析与发展前景预测报告(2022-2029年)>显示:2021年我国即时通讯用户为10.07亿人 ...
- github使用指南_所有开源项目免费使用,GitHub 内置 CI/CD 终于来了
2019 年 8 月 8 日,GitHub 官方博客发文称,程序员期待已久的功能来了,Github Actions 终于支持内置 CI/CD 了,并对所有开源项目免费!目前该功能可以在 Beta 版本 ...
- github 怎么搜索_实用!8个玩转GitHub的小插件,快来试试吧!
作为程序员对 GitHub 应该都不会陌生,我经常沉迷其中,找一些惊艳的项目或者工具.不过用的时间久了,发现它的用户体验实在是不敢恭维,有时候会让你做很多重复操作,浪费不少时间. 比如我想单独下载一个 ...
- github private链接访问_如何将Jenkins链接到私有Github存储库?
我的目标是将私有Github存储库拉到Jenkins . 以下是一些背景: MacOS Jenkins在本地托管, localhost:8080 在Jenkins中安装了Git插件和Github插件 ...
- gitlab ci 自动化部署_前端gitLab加jenkins自动化构建和部署,以及服务器常用的linux命令行操作,免密登录...
常用的linux命令行操作 将项目部署到服务器后,需要查看文件是否已经部署成功,已经对文件进行增删改查操作,就需要用到命令行操作,常用操作如下: ll 罗列出当前文件或目录的详细信息,含有时间.读写权 ...
- github 私有化部署_2019,GitHub 宣布私有代码仓库从此免费!
微软收购 GitHub 后,官方宣布了一项重大更新:免费开放私有代码库,即 GitHub 用户现在可以免费创建无限量的私有存储库.同时还有另一项更新--GitHub Enterprise,结合了企业云 ...
最新文章
- 纯css+html实现发光伸缩卡片
- linux模拟主机宕机,AIX HA模拟宕机--维护磁带机
- 11款有用的Web开发在线工具
- windows 64 oracle sga,oracle 10g for windows sga区最大多少
- JustOj 2038: 叶神的字符串
- cobbler get-loaders 错误解决方法
- 程序员输入法_解决Pycharm输入法不跟随光标
- 《变革中的思索》连载九:放飞的爱——母亲和我
- matlab a1处语法无效,MATLAB常见错误
- 1004-史丰收速算
- 模拟 hdu5268 ZYB loves Score
- C语言入门——常见数据类型取值范围
- 毕业生签三方?报到证?档案户口?
- 【node爬虫】通过高德接口爬取地址的经纬度
- 成为成功的软件开发顾问的5个关键
- 《优势教养》:开放式沟通vs负面偏见
- 非常实用的cmd命令
- C++prime读书笔记(二)C++标准库:IO、容器、泛型算法、动态内存
- 计算机网络文件丢失怎么找回,电脑上的数据误删除了怎么恢复?教你几招!
- 阿里P8架构师制作的24张前端全栈知识图谱,堪称完美学习宝典
热门文章
- RSA(python)
- 高速公路视频监控系统的Bypass 工业以太网交换机特点
- 新闻发布系统的软件测试计划,新闻发布系统毕业设计.doc
- 2021前端面经-看这篇就够了(笔者靠这个拿到阿里和字节的offer)
- 乐视发布超4 X70/Max65/Max55 2017发力声学打造音质新标杆
- 新时达工业机器人技术储备_工业机器人知多少,资深人士分享!
- 鸿蒙系统有希望像ios一样流畅,华为鸿蒙系统或继承了“IOS系统”大量优点,流畅性不输对手!...
- 2016.3.15__H5页面实战__第七天
- GICv3软件overview手册之LPI(1)
- 第七届蓝桥杯省赛——6凑算式(套全排列公式)