1. 程式人生 > >centos7搭建git服務器(多用戶版)

centos7搭建git服務器(多用戶版)

創建 entos chgrp fff cto har pro pass 修改配置文件

  • 創建倉庫並分享到組:
    git  init  --shared=group  test
  • 創建組:
    groupadd  git
  • 切換項目所屬組:
    chgrp  -R  git  test
  • 創建用戶1:
    useradd  test1  -g  git
    passwd  test1
  • 創建用戶2:
    useradd  test2  -g  git
    passwd  test2
  • 修改配置文件:
    vim test/.git/config
    添加
    denyCurrentBranch = ignore

    技術分享圖片

  • centos7搭建git服務器(多用戶版)