Let user push only to his own branch

Does anyone know how one can restrict push to some git repository branch based on “pusher’s” public key? Example: Alice wants to push changes to branch named “Bob” but push is refused on the server because her private key does not correspond to the public key stored in branch “Bob”. Only Bob has the corresponding private key and thus can push to “Bob” branch.

  • After deployment the permissions are not the one i wanted
  • Nginx only has drwx---— for directories
  • Git permissions issue
  • Permissions issues with Azure Websites?
  • Can git retain file owner, permissions, ACLs, and file attributes on a local Windows NTFS machine?
  • Set up ruby globally for all users on ubuntu 14.04
  • git fetch insufficient permission for adding an object to repository database .git/objects?
  • Where can I get the description of `--shared` option of `git init` command for Windows?
  • One Solution collect form web for “Let user push only to his own branch”

    Have a look at Gitolite which allows this fine level of control.

    Personally – I think that if you need this level of control in your repository, you’re perhaps doing it wrong, but I suppose you have your reasons.

    If you want to have branches that are read only to everyone but the pusher, why not just let Alice and Bob have their own public repositories that only they can push to – if you want to see what is on their branch then pull from their repo.

    The difference here is that rather than have one repo with lots of private branches – everyone has their own repo to push to but you can all pull from each other. Git is a distributed system, after all.

    Git Baby is a git and github fan, let's start git clone.