How can I setup a GitBlit repository preventing users to push?

2.8k views Asked by At

I would like that authenticated users can only:

  • view
  • clone
  • fetch/pull from it?

basically I want prevent users, even authenticated ones, to push to this git repo. But for other git repos on the same GitBlit I may desire to have authenticated users to also push to those repos.

thank you in advance

2

There are 2 answers

2
VonC On

As mentioned in the Gitblit FAQ, the easiest way would be to install in addition of Gitblit a gitolite, which is an authorization layer.

That will allow you to put in place all kind of access restriction, based on user authentication.

0
James Moger On

Gitblit 1.2.0, released 2012-12-31, introduced finer-grained permissions which address your exact needs.

The enhanced permissions, however, are still not as flexible as Gitolite which allows per-ref permissions. Gitblit's permissions apply to the repository, not to a particular ref.