Can we restrict the access for sub folders in gitlab?

Hi

Can we restrict the access for sub folders in gitlab? If i want to restrict access to a particular folder in a repo. is it possible ?

Hi Ahmad,

Unfortunately, this is not yet possible. If a user has access to view the repo they would be able to view all the folders and files of the repo

Ok. Thank you !!

I’m digging this out, but just to add some information.

You actually can setup some subfolder permissions by using git submodule instead of folder.

For exemple:

cd publicRepo/
# Add a non-accessible subdirectory
git submodule add git@.../privateConfig config
git add config .gitmodules

Into the web interface, the non-autorized user will not be able to access to ‘config’ subfolder.