We have a gitlab server running on our internal network which is configured to store repositories on a cifs mount (project requirement). Moreover this nas drive must be accessible from the outside network and should also allow git operations on repos from this other network, thereby not even acknowledging the existence of a gitlab server. This leads to several problems which I have been trying to solve.
One problem was that gitlab does explicit permission checks (770 for some folder, 2770 for another etc. etc.) for some folders which is not possible on a cifs mount. I fixed it by disabling this check (manage_storage_directories['enable'] = false) in /etc/gitlab/gitlab.rb
However, it seems that Gitlab relies heavily on the presence of hooks in the repo. Otherwise quite a few things break. And by default gitlab will always try to create a symlink for the hooks folder in a repo. You could workaround this by first creating a project locally and then moving/migrating existing project to this cifs mount. I then actually place the hook files instead of a symlink.
I do not want to do this HACK for every new project. If I try otherwise, I always get an error "The form contains the following error: Failed to create repository via gitlab-shell" on the web interface.
For something similar, see: https://gitlab.com/gitlab-org/gitlab-ce/issues/13734
For the moment, I would prefer to not touch the smb server on the nas to enable some flags for allowing symlinks (if thats even possible).
Feel free to ask for more info. Thanks in advance!