permissions problem when pushing an entire repo

788 views
Skip to first unread message

euphxenos

unread,
May 30, 2017, 8:36:45 PM5/30/17
to Repo and Gerrit Discussion
I have an entire repository I'm trying to push to a new project in Gerrit 2.14.  When I do "git push --mirror origin" I'm getting a bunch of errors that look like this:

 ! [remote rejected] refs/cache-automerge/fa/d15a5a6fd2e02a8f13c570f4a0c61b1873e38a -> refs/cache-automerge/fa/d15a5a6fd2e02a8f13c570f4a0c61b1873e38a (prohibited by Gerrit: create access denied for refs/cache-automerge/fa/d15a5a6fd2e02a8f13c570f4a0c61b1873e38a)

To get this pushed I've granted myself create reference, create annotated tag, forge author identity, forge committer identity, push (including force), and push merge commit on refs/*.  After I encountered this error, I tried explicitly giving myself create reference on refs/cache-automerge/*, but that didn't make a difference.  Is there a permission that I've missed?

If it makes a difference, this repo is the result of mirroring an existing repo, then using git-lfs-migrate on it (I'll do a git lfs push after I get this initial git push to work).


thanks,
--Andrew

David Pursehouse

unread,
May 30, 2017, 9:18:57 PM5/30/17
to euphxenos, Repo and Gerrit Discussion
On Wed, May 31, 2017 at 9:36 AM euphxenos <euph...@gmail.com> wrote:
I have an entire repository I'm trying to push to a new project in Gerrit 2.14.  When I do "git push --mirror origin" I'm getting a bunch of errors that look like this:

When you push with --mirror it will push everything including the meta refs like refs/changes and refs/meta/config, which is going to cause all sorts of issues besides this error about refs/cache-automerge. 

You most likely don't need to push all of those into the new project; it will already have its own refs/meta/config, the refs/changes will be created as new changes are pushed for review, and refs/cache-automerge will be created as needed for new changes.

I would suggest either:

- delete the unwanted refs (refs/changes, refs/meta/config, refs/cache-automerge, etc) and then push with --mirror again

or

- don't use --mirror and change the refspec to only push refs/heads and refs/tags



 

 ! [remote rejected] refs/cache-automerge/fa/d15a5a6fd2e02a8f13c570f4a0c61b1873e38a -> refs/cache-automerge/fa/d15a5a6fd2e02a8f13c570f4a0c61b1873e38a (prohibited by Gerrit: create access denied for refs/cache-automerge/fa/d15a5a6fd2e02a8f13c570f4a0c61b1873e38a)

To get this pushed I've granted myself create reference, create annotated tag, forge author identity, forge committer identity, push (including force), and push merge commit on refs/*.  After I encountered this error, I tried explicitly giving myself create reference on refs/cache-automerge/*, but that didn't make a difference.  Is there a permission that I've missed?

If it makes a difference, this repo is the result of mirroring an existing repo, then using git-lfs-migrate on it (I'll do a git lfs push after I get this initial git push to work).


thanks,
--Andrew

--
--
To unsubscribe, email repo-discuss...@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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

euphxenos

unread,
Jun 6, 2017, 3:35:15 AM6/6/17
to Repo and Gerrit Discussion, euph...@gmail.com


On Tuesday, May 30, 2017 at 6:18:57 PM UTC-7, David Pursehouse wrote:
On Wed, May 31, 2017 at 9:36 AM euphxenos <euph...@gmail.com> wrote:
I have an entire repository I'm trying to push to a new project in Gerrit 2.14.  When I do "git push --mirror origin" I'm getting a bunch of errors that look like this:

When you push with --mirror it will push everything including the meta refs like refs/changes and refs/meta/config, which is going to cause all sorts of issues besides this error about refs/cache-automerge. 

You most likely don't need to push all of those into the new project; it will already have its own refs/meta/config, the refs/changes will be created as new changes are pushed for review, and refs/cache-automerge will be created as needed for new changes.

I would suggest either:

- delete the unwanted refs (refs/changes, refs/meta/config, refs/cache-automerge, etc) and then push with --mirror again

or

- don't use --mirror and change the refspec to only push refs/heads and refs/tags


Thanks -- I got past this by doing a "git push --all origin" (to push refs/heads), followed by "git push --tags origin" (to push refs/tags).  How would I go about deleting the unwanted refs from a repository after I've cloned it?  I'm looking at other problems where that would be useful, but I can't seem to find how to do that.


thanks,
--Andrew
Reply all
Reply to author
Forward
0 new messages