管理中央GIT回购文件许可

发布于 2025-02-10 17:50:46 字数 2031 浏览 0 评论 0原文

目前,我的任务是为我的团队建立中央git仓库。 我们在Linux环境中。

我通过这样做创建了一个新的存储库

cd aaa
git init --bare
cd ..
chmod -R 770 aaa

,实际上我正在控制只有具有组许可的用户才能进行git push

但是,我注意到,用户基本上是用户本身拥有的,而不是我(我是psginfra),用户基本上是用户所有的对象。

scc919025> tree -u aaa
aaa
├── [psginfra]  HEAD                                                                                                                                                                                                                      
├── [psginfra]  info                                                                                                                                                                                                                      
│   └── [psginfra]  exclude                                                                                                                                                                                                               
├── [psginfra]  objects                                                                                                                                                                                                                   
│   ├── [lionelta]  03                                                                                                                                                                                                                    
│   │   └── [lionelta]  e00cbf0a110c2a8d55f5e0109c40745f27c0f1                                                                                                                                                                                                               

正如您可以从tree命令在中央git裸仓库上运行的那样,用户推动的对象lionelta由他所有,并且受他的保护。

当涉及到中央存储库时,由于权限问题,我无法将整个repo AAA移动。

我的问题是,有没有一种克服这一方法的方法?还是最好的方法可以更好地管理中央裸露的存储库,以便管理员在围绕仓库中移动的灵活性更大?

提前致谢。

I am being currently tasked with setting up a central git repo for my team.
We are in linux environment.

I created a new repo like this

cd aaa
git init --bare
cd ..
chmod -R 770 aaa

By doing so, I am actually controlling that only users that have the group permission is able to do a git push.

However, i noticed that, the objects that were git push by the users are basically owned by the users themselves, and not me (I am psginfra).

scc919025> tree -u aaa
aaa
├── [psginfra]  HEAD                                                                                                                                                                                                                      
├── [psginfra]  info                                                                                                                                                                                                                      
│   └── [psginfra]  exclude                                                                                                                                                                                                               
├── [psginfra]  objects                                                                                                                                                                                                                   
│   ├── [lionelta]  03                                                                                                                                                                                                                    
│   │   └── [lionelta]  e00cbf0a110c2a8d55f5e0109c40745f27c0f1                                                                                                                                                                                                               

As you can see above from the tree command ran on the central git bare repo, the objects which are pushed by user lionelta is owned by him, and are protected by him.

When it comes to managing the central repo, I can not move the entire repo aaa around due to the permission issue.

My question is, is there a way of overcoming this? Or a Best Known Method to better manage a central bare repo, so that the admin can have more flexibility in moving around the repo?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文