Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

gitblit

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

like image 267
Fabio Vitale Avatar asked Oct 20 '12 08:10

Fabio Vitale


2 Answers

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.

like image 193
James Moger Avatar answered Oct 29 '22 16:10

James Moger


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.

like image 27
VonC Avatar answered Oct 29 '22 16:10

VonC