【gitlab】修改默认存放存放目录

流程

  1. 共享文件路径是 /mnt/hgfs/project

  2. 停掉gitlab

    gitlab-ctl stop

  3. 修改gitlab的配置文件,找到

    vim /etc/gitlab/gitlab.rb

  4. 找到 git_data_dirs里面的path 换成共享文件路径

    git_data_dirs({

    "default" => {

    "path" => "/mnt/hgfs/project"

    }

    })

  5. 将旧的gitlab数据迁移到新目录 (使用 rsync 命令)

    rsync -av /var/opt/gitlab/git-data/repositories /mnt/hgfs/project

  6. 重新加载配置

    gitlab-ctl repositories

  7. 启动gitlab,等待几分钟

    gitlab-ctl start

  8. 这时候本地电脑project文件和虚拟机project文件已经有gitlab文件

相关推荐
有同事要进步2 天前
如何在github或者是gitlab上创建空文件
gitlab·github
GoodStudyAndDayDayUp4 天前
gitlab私有化跑CICD
gitlab·gitlab私有化跑cicd
成为你的宁宁4 天前
【Gitlab测试项目】
gitlab·devops
_可乐无糖6 天前
GitLab CI 脚本之 CI_COMMIT_AUTHOR
ci/cd·gitlab
_可乐无糖7 天前
GitLab CI 脚本之 dependencies 和 needs
ci/cd·gitlab
Fan_5588 天前
4核8G云服务器部署GitLab内存耗尽解决方案
gitlab
洋就在江州8 天前
gitlab-cicd 离线集成——springboot-cicd (非docker形式,shell形式)
java·spring boot·后端·ci/cd·gitlab·gitlab-runner
成为你的宁宁9 天前
【Ubuntu 18.04安装Gitlab】
ubuntu·gitlab
长春的KAKA9 天前
GitLab 项目页面报 500 错误的完整修复记录:PostgreSQL 数据库损坏、统计表缺失及数据库迁移
数据库·postgresql·gitlab
蓝胖的四次元口袋9 天前
GitLab知识梳理
gitlab