Git:服务器上多个用户的存储库
我在服务器上创建了一个 Git 存储库,并希望它可供多个人使用,即属于同一 Unix 组的用户。它还有一个工作副本,因为拥有一个通用的工作副本可能对我们很有用。
因此,我将该 Git repo 目录的所属组设置为该 Unix 组。
问题是,每次有人推送到该存储库时,新文件/目录的所有者都会设置为该用户及其组的用户名,但不是我们的公共组。此外,所有这些新文件/目录都会变成 rwxr-xr-x。
我尝试了 git config core.sharedRepository group ,但这并没有真正起作用。它现在将文件/目录设置为 rwxrwsr-x,但仍然具有错误的组集。
I created a Git repo on a server and want it to be used by several people, i.e. users which belong to the same Unix group. It also has a working copy because it may be useful for us to have a common working copy.
Thus I set the owning group of that Git repo directory to that Unix group.
The problem is, every time someone is pushing to that repository, the new files/directories have the owner set to the username of that user and his group but not our common group. Also, all those new files/directories become rwxr-xr-x
.
I tried git config core.sharedRepository group
but that doesn't really work. It now makes files/directories as rwxrwsr-x
but is has still the wrong group set.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,想通了。
第一件重要的事情(我已经做了)是:
第二件是这样的:
Ok, figured it out.
The first important thing (which I did already) was:
The second one was this:
我强烈建议您使用 gitolite 进行组织和 git 内的任何权限管理。这使得回购的管理变得更加容易。
I would highly recommend you use gitolite for any rights management within an organization and git. This has made management of the repos so much easier.