14

how do I mirror a git repository to Gerrit?

I will do this:

[git repository for libdrm] -> my gerrit <-> developers

Gerrit download changes from freedesktop git repository. Developers clone repository from gerrit and push into gerrit. Developers never pushes changes to main repository.

I have created new project with gerrit. I download repository:

git clone http://anongit.freedesktop.org/git/mesa/drm.git

I will push this repository to gerrit, but I can't because I have got errors:

remote: ERROR:  In commit ced219ebbd3b266ac8326223bad62f994907ae6b
remote: ERROR:  committer email address chris@chris-wilson.co.uk
remote: ERROR:  does not match your user account.
remote: ERROR:
remote: ERROR:  The following addresses are currently registered:
remote: ERROR:    xxx@example.com
remote: ERROR:
remote: ERROR:  To register an email address, please visit:
remote: ERROR:  http://mygerrit-server/#/settings/contact

I have permisions for all. How I can add mirror to gerrit?

Taylan Aydinli
  • 4,333
  • 15
  • 39
  • 33
esio
  • 1,592
  • 3
  • 17
  • 30

1 Answers1

22

You need the 'Forge Committer' and 'Forge Author' access permissions. This tells Gerrit to ignore that you aren't the author or committer of the commits you are pushing. http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/access-control.html#category_forge_author

David Pursehouse
  • 933
  • 6
  • 14
Brad
  • 5,492
  • 23
  • 34
  • On our gerrit the forge committer and forge author flags are BLOCKED globally. Any idea how to rewrite the committers for all commits at once? – zbug Nov 11 '14 at 13:37
  • You can use `git filter-branch` to batch changes to commits. One quick example is at https://help.github.com/articles/changing-author-info/ – Brad Nov 12 '14 at 16:11