1. 程式人生 > >centos7搭建git伺服器(多使用者版)

centos7搭建git伺服器(多使用者版)

  1. 建立倉庫並分享到組:
    git  init  --shared=group  test
  2. 建立組:
    groupadd  git
  3. 切換專案所屬組:
    chgrp  -R  git  test
  4. 建立使用者1:
    useradd  test1  -g  git
    passwd  test1
  5. 建立使用者2:
    useradd  test2  -g  git
    passwd  test2
  6. 修改配置檔案:
    vim test/.git/config
    新增
    denyCurrentBranch = ignore

    centos7搭建git伺服器(多使用者版)