title: Gitolite restrict access to branch
body: <p>I have GITOLITE on my server and I want to configure access to my repository. I want to restrict access to some branches for some users. I try a lot of variants how to configure gitolite.conf file and I didn't find solution how to restrict acces to some branches.</p>
  
  <p>1) </p>
  
  <pre><code>@developers1 = user1
  @developers2 = user2
  
  repo dbatest 
     RW+    = @developers1
     R test = @developers2
     - test = @developers2
     RW+    = @developers2
  </code></pre>
  
  <p>When user2 executed command: <code>git push origin test</code>: push succeed
  In gitolite log I had this lines:</p>
  
  <pre><code>http    ARGV=user2  SOC=git-receive-pack 'dbatest'  FROM=10.65.184.239
  6453    pre_git dbatest user2   W   any refs/.*
  6453    system,git,http-backend
  6453    END
  </code></pre>
  
  <p>2)  </p>
  
  <pre><code>@developers1 = user1
  @developers2 = user2
  
  repo dbatest 
     RW+    = @developers1
     - test = @developers2
     RW+    = @developers2
  </code></pre>
  
  <p>When user2 executed command: <code>git push origin test</code>: push succeed
  In gitolite log I had this lines:</p>
  
  <pre><code>http    ARGV=user2  SOC=git-receive-pack 'dbatest'  FROM=10.65.184.239
  6457    pre_git dbatest user2   W   any refs/.*
  6457        system,git,http-backend
  6457    END
  </code></pre>
  
  <p>3)</p>
  
  <pre><code>@developers1 = user1
  @developers2 = user2
  
  repo dbatest 
     RW+    = @developers1
     R test = @developers2
     - test = @developers2
     RW+    = @developers2
     option deny-rules = 1
  </code></pre>
  
  <p>When user2 executed command: <code>git push origin test</code>: push denied and he saw this message:</p>
  
  <pre><code>fatal: remote error: FATAL: W any dbatest user2 DENIED by refs/heads/test
  (or you mis-spelled the reponame)
  </code></pre>
  
  <p>And in gitolite log i had this:</p>
  
  <pre><code>8161    http    ARGV=user2  SOC=git-receive-pack 'dbatest'  FROM=10.65.184.239
  8161    die W any dbatest user2 DENIED by refs/heads/test&lt;&lt;newline&gt;&gt;(or you mis-spelled the reponame)
  </code></pre>
  
  <p>It's look like good, but when he try to push something into the master branch he had this meesage to. </p>
  
  <p>I tryed mix this lines in my gitolite config file but they didn't work for me.</p>
  
  <p>I will be happy if someone can help me with it. I want to restrict write access to some branches for some developers. I cann't create additional repository I must to use restrict policy on one main repository.</p>
  
  <p>Big Thanks!</p>