设置git子模块的权限? [英] Set rights to git submodules?

查看:308
本文介绍了设置git子模块的权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对git子模块有疑问.

I have a question about git submodules.

我有一个需要访问2个存储库的项目:回购1:主项目回购Repo2:作为子模块访问.其他项目也可以访问Repo 2

I have a project that needs to access 2 repos: Repo1: main project repo Repo2: Accessed as a submodule. Repo 2 is also accessed by other projects

是否可以设置Repo2访问权限?更具体地说,repo1应该能够从repo2中提取.但是我想如果repo1没有权限更新repo2,并将更新推回服务器.如果repo1可以更新repo2,则其他需要repo2访问权限的项目也将获得更新,而这些更新可能会变得混乱

Is there a way to set Repo2 access rights? More specifically, repo1 should be able to pull from repo2. But I would like if repo1 has NO right to update repo2, and push back the updates to the server. If repo1 can update repo2, other projects that need repo2 access will also get the updates, which can get messy

有什么想法吗?

欢呼

推荐答案

Git本身具有没有授权(或身份验证)功能:如果您的父仓库可以更新并从repo2中提取,那么它也可以推送.

Git itself has no authorization (or authentication) feature: if your parent repo can update and pull from repo2, then it can push too.

这取决于您访问repo2的方式,以及repo2 git服务器是否已安装授权层(例如 gitolite ).然后,您将可以微调所需的任何访问级别.

It depends on how you access repo2, and if the repo2 git server has installed an authorization layer (like, for instance, gitolite). Then you would be able to fine-tune any access level you want.

这篇关于设置git子模块的权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆