Sathya
Sathya

Reputation: 23

Git push prevention to remote

I have created a git bare repository in my local system and I have maintained a few files in it now. Other users can clone, pull, push and commit changes, who know my ip address and git path. All I want to do is allow all user with only read permission. I dont want them to push it into the repository without me reviewing it. So when they commit the changes.I should be able to review it and then update it in the repository.Can anyone help me with this setting and the git commands to use.

Regards,

Sathya Prasad P

Upvotes: 0

Views: 51

Answers (2)

gturri
gturri

Reputation: 14599

You should have a look at Gerrit: it's a web-based application which is, in a way, a wrapper around Git, which help code review.

With this tool, you could let your users clone, submit merge request, and make sure only you could keep the permissions to push directly.

Upvotes: 1

Tal
Tal

Reputation: 7997

to make a repository read only please follow instructions in this useful thread.

However, it sounds that you're looking for the git-request-pull command, where users submit changes for review and merge them only after approval. The native command is useless without a proper workflow and diff tools, which are wonderfully implemented in GitHub and BitBucket (the latter free for small projects).

Upvotes: 3

Related Questions