当前位置: 首页 > news >正文

Ubuntu自建git服务器

Ubuntu 安装 gitlab-ce

sudo apt-get update
sudo apt-get install gitlab-ce

安装成功

 sudo apt-get install gitlab-ce
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列【新】软件包将被安装:gitlab-ce
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 78 个软件包未被升级。
需要下载 1,085 MB 的归档。
解压缩后会消耗 3,101 MB 的额外空间。
获取:1 https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu focal/main amd64 gitlab-ce amd64 16.5.0-ce.0 [1,085 MB]
已下载 1,085 MB,耗时 1分 41秒 (10.8 MB/s)                                                                       
正在选中未选择的软件包 gitlab-ce。
(正在读取数据库 ... 系统当前共安装有 260201 个文件和目录。)
准备解压 .../gitlab-ce_16.5.0-ce.0_amd64.deb  ...
正在解压 gitlab-ce (16.5.0-ce.0) ...
正在设置 gitlab-ce (16.5.0-ce.0) ...
It looks like GitLab has not been configured yet; skipping the upgrade script.*.                  *.***                 ********               *****.******             ***************            ********,,,,,,,,,***********,,,,,,,,,,,,,,,,,,,,*********,,,,,,,,,,,.,,,,,,,,,,,*******,,,,,,,,,,,,,,,,,,,,,*****,,,,,,,,,.,,,,,,,****,,,,,,.,,,***,,,,,*,._______ __  __          __/ ____(_) /_/ /   ____ _/ /_/ / __/ / __/ /   / __ `/ __ \/ /_/ / / /_/ /___/ /_/ / /_/ /\____/_/\__/_____/\__,_/_.___/Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:sudo gitlab-ctl reconfigureFor a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.mdHelp us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=16-5

配置端口及网址

# 编辑文件
vim /etc/gitlab/gitlab.rbexternal_url 'http://gitlab.example.com'
# 更改为如下
external_url 'http://<本机ip>:8899'

设置存储位置

        1.  拷贝原数据到新目录下。

cp -r /var/opt/gitlab/git-data/* /media/myradi5/data/gitlab-ce/data

        2.  /etc/gitlab/gitlab.rb中找到下面的字段,去除注释符,修改“path=”

git_data_dirs({"default" => {"path" => "/media/myradi5/data/gitlab-ce/data"}})

设置文件夹权限

sudo chmod 2770 /media/myradi5/data/gitlab-ce/data/

重新配置

sudo gitlab-ctl reconfigure
# 开启应用
sudo gitlab-ctl start

验证: 输入<IP>:8899

注册了用户,首次登录提示

登陆不上---------------------------------------------Your account is pending approval from your GitLab administrator and hence blocked. Please contact your GitLab 

首次需要在24小时内使用Root用户登录,密码在“ /etc/gitlab/initial_root_password”文件中。

授权新用户入口

http://www.lryc.cn/news/213316.html

相关文章:

  • 【面试专题】并发编程篇①
  • Linux Centos7安装后,无法查询到IP地址,无ens0,只有lo和ens33的解决方案
  • 行为型模式-访问者模式
  • go-kit中如何开启websocket服务
  • 私有网络的安全保障,WorkPlus Meet内网视频会议助力企业高效会议
  • 国际权威媒体聚焦:孙宇晨和波场TRON在迪拜荣获加密行业重磅奖项
  • 新闻详情。
  • Java面试题-Redis-第二天(Redis持久化、过期键删除策略、内存淘汰策略)
  • ElasticSearch快速入门实战
  • 揭秘MySQL数据同步至Elasticsearch的最佳方案与技巧
  • 正点原子嵌入式linux驱动开发——Linux RTC驱动
  • 基于EasyCVR技术的大数据视频汇聚与智能分析平台设计方案
  • 骨传导耳机到底好用吗,到底骨传导耳机是不是噱头呢?
  • bitsandbytes 遇到CUDA Setup failed despite GPU being available.
  • 【机器学习】决策树与分类案例分析
  • 基于物联网、大数据、云计算、人工智能等技术的智慧工地源码(Java+Spring Cloud +UniApp +MySql)
  • Py之pypdf:pypdf的简介、安装、使用方法之详细攻略
  • 谷歌Bard更新!会有哪些体验升级?
  • [SHCTF 2023 校外赛道] reverse
  • pytorch:Model模块专题
  • Spring更加简单的读取和存储对象
  • Webpack5 系列:Babel 的配置
  • 【Spring】DI依赖注入,Lombok以及SpEL
  • 甘特图组件DHTMLX Gantt用例 - 如何自定义任务、月标记和网格新外观
  • auto自动类型推导总结
  • 透视2023,如何看清中国SaaS的未来之路?
  • 分类预测 | Matlab实现KOA-CNN-LSTM-selfAttention多特征分类预测(自注意力机制)
  • 博客系统-项目测试
  • Inspeckage,动态分析安卓 APP 的 Xposed 模块
  • Windows详细安装和彻底删除RabbitMQ图文流程