Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You have two totally different questions:</p> <h2>1. How do I restrict the users allowed to push on a given branch?</h2> <p>First you need a way to authenticate your users. The easiest way to do so is by personalized ssh keys. Then you need a layer of authorization to determine who is allowed to push on which branch. This can be done by a software like <a href="http://git-scm.com/book/ch4-8.html" rel="nofollow noreferrer">gitolite</a>. Please <em>read</em> this link for more information.</p> <h2>2. How do I make sure people do not use a fake identity via <code>git config user.name</code>?</h2> <p>First you cannot prevent people to use arbitrary names while committing at their local repositories. You can only check once they try to push those commits to your central repository.</p> <p>A single push is able to transfer multiple commits. If you want to make sure each commit contains the correct user name and mail address, you first have to make sure you know who is currently pushing. And then you need to check all pushed commits for the correct user name and mail address.</p> <p>You can again use <a href="https://stackoverflow.com/questions/15939529/in-gitolite-how-to-reject-pushes-containing-incorrect-author-info">gitolite</a> for that. Also <a href="http://code.google.com/p/gerrit/" rel="nofollow noreferrer">gerrit</a> is able to do <a href="http://gerrit.googlecode.com/svn/documentation/2.1.2/access-control.html#category_FORG" rel="nofollow noreferrer">this kind of checks</a>. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload