Unable to add force-push permissions

4,174 views
Skip to first unread message

Jason Axelson

unread,
Jul 21, 2011, 5:45:36 PM7/21/11
to Repo and Gerrit Discussion
Hi,

I have a configuration repository that I want to allow the ability for
certain users to do force pushes (non-fast forward). According to the
gerrit documentation I should be able to add a "Force Push Branch;
Delete Branch" permissions:
http://gerrit.googlecode.com/svn/documentation/2.1/access-control.html#category_pHD

However, in my gerrit project access control admin page I only see the
following permissions: Push, Push Merge Commit, Push Annotated Tag.
Granting all of those permissions still leaves me with the same error:

user@server2:~/config$ git push -f
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 318 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 0% (0/2)
To server:server-config.git
! [remote rejected] hogg2 -> hogg2 (non-fast forward)
error: failed to push some refs to 'rams-build-vm:server-config.git'

However, I can push up regular fast-forward commits to the repo. I've
also tried to add the following to the $gerrit_loc/git/server-
config.git/config file:
[receive]
denyNonFastForwards = false

Which I got from the http://gerrit.googlecode.com/svn-history/r6481/documentation/2.2.0/error-non-fast-forward.html
gerrit page.

Does anyone know how I could allow force pushes?

Thanks,
Jason

Shawn Pearce

unread,
Jul 22, 2011, 10:12:01 AM7/22/11
to Jason Axelson, Repo and Gerrit Discussion
On Thu, Jul 21, 2011 at 14:45, Jason Axelson <jaxe...@referentia.com> wrote:
> I have a configuration repository that I want to allow the ability for
> certain users to do force pushes (non-fast forward). According to the
> gerrit documentation I should be able to add a "Force Push Branch;
> Delete Branch" permissions:
> http://gerrit.googlecode.com/svn/documentation/2.1/access-control.html#category_pHD
>
> However, in my gerrit project access control admin page I only see the
> following permissions: Push, Push Merge Commit, Push Annotated Tag.
> Granting all of those permissions still leaves me with the same error:

Grant Push. To the right on the group line there is a Force flag.
Check it to true.

Jason Axelson

unread,
Jul 22, 2011, 5:53:43 PM7/22/11
to Shawn Pearce, Repo and Gerrit Discussion
Thanks Shawn! I'm not really sure how I missed that.

Jason

Message has been deleted

Edwin Kempin

unread,
Jun 7, 2017, 1:54:30 AM6/7/17
to gurumurth...@gmail.com, Repo and Gerrit Discussion, jaxe...@referentia.com
Maybe force push is blocked on the parent project?

On Tue, Jun 6, 2017 at 10:45 PM, <gurumurth...@gmail.com> wrote:
Hi Shawn,

I have created a git repo we use gerrit. I have given the all permissions to the user even I have given the owner permissions too. But still users are getting forbidden error / authentication error. May I know the reason ? Can you please help me on this. For your reference I am also attaching the screenshot of what permissions I have given to the user kindly check it and help me in this.

Thanks,
Mani.  

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages