Gitosis添加新工程

2018-04-21  本文已影响17人  最怕认真

找到git下git-acces的config文件
添加如下格式的内容

[group test]    
members = Mac   #这个是xxx.pub文件名,例如:marco.pub
writable = test

其中group代表一个组,writable是仓库名,members是此仓库的成员,可以有多个成员,用空格进行分割。

执行提交语句

git add .
git commit -m "日志"
git push

如果是新开一个工程,可以在服务器上新建一个git工程,然后关联远程地址 git@localhost:项目名.git
如果是已经有一个工程,现在想通过git来管理,那么直接将工程的远程地址关联为 git@localhost:项目名.git

常见错误


Error 1

ERROR:gitosis.serve.main:Repository read access denied
fatal: The remote end hung up unexpectedly

这个错误是因为,你的gitosis.conf有问题
members 这一项中的pub名字和keydir下的不同,或者根本就没添加到对应的pub文件名


上一篇 下一篇

猜你喜欢

热点阅读