Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Put whole gitlab installation to read-only mode

Tags:

gitlab

I wish to deny to push changes to any repository by any user. Technically, I need to switch whole gitlab to read-only mode. Is there simple way to do this?

like image 990
Semyon Novikov Avatar asked Apr 23 '15 08:04

Semyon Novikov


2 Answers

If you don't want to mess with the user privileges (as done in this PR), one approach would be to change the gitlab-shell pre-receive hook.

If the pre-receive hook always "exit 1", that should disable any push to any repo.

like image 186
VonC Avatar answered Sep 22 '22 18:09

VonC


Actually a better answer is to change this flag to true. This makes the entire instance read only and adds a nice header in the app.

like image 29
Cristian Oneț Avatar answered Sep 24 '22 18:09

Cristian Oneț