Restricting rights on GitHub
My team is currently using Gerrit as code review tool for our git repos. Now we want to move some of them to GitHub. I’m not expecting to have as fine grained control over the rights as would be the case with Gerrit.
I would however like to restrict direct pushing onto master. People should first create a pull request and then have this merged by a colleague. These same people should be able to merge pull requests, so not giving them any rights on the repo is not an option.
- Merging pull requests together
- What's the difference between a Pull Request and a branch?
- Proper approach to merge conflicts when pushing from a fork?
- How do I do many pull requests to a project on Github and keep my master updated at the same time while waiting for reviews?
- Creating pull requests in gitlab
- Default pull request to parent branch rather than master branch in Visual Studio Team Services?
Is this possible somehow?
One Solution collect form web for “Restricting rights on GitHub”
Github doesn’t have fine-grain permission settings, or at least not fine enough to disallow push but allow merging pull-request. Pre-receive hooks would also allow to distinguish pushes and pull-requests, but they can’t be used on GitHub. So you have two options:
- forbid people from directly pushing to GitHub, even if technically they can
- use GitLab along with Gitolite, which will allow much more powerful permissions, and provide the same kind of functionalities than GitHub