简体   繁体   中英

How to disable access to part of Git repository?

I'm wondering how to structure Git repository to serve two groups of developers. Those groups share most of the code but one of them should have not access to a part of repository/library/submodule.

How to ensure the cloned repository does not contain a certain part/library for given set of developers? The other group of developers should work with repo seamlessly.

Should that case be solved within Git repository or rather managed outside of it with additional tools?

One way is to make extra repositories for that submodules and give clone rights only programmer who should work with.

Then you can use the git submodule command to insert that modules in your project but thats a annoying way if you have a lot of modules.

Its much easier if you use composer then you can set the complete structure for your packages in a composer file and tell composer which modules should be loaded in your project. For you own composer package management you can use Satis .

https://github.com/composer/satis

If you have no management system for git you can use gitolite3, gitlab, github there are a lot of programs to do the work and set access management to your repository.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM