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服务器(多用户版)

猜你喜欢

转载自blog.51cto.com/12173069/2324839