带有 gerrit 的 Git 镜像

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9262297/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 06:28:17  来源:igfitidea点击:

Git mirror with gerrit

gitgerrit

提问by esio

how do I mirror a git repository to Gerrit?

如何将 git 存储库镜像到 Gerrit?

I will do this:

我会做的:

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

[libdrm 的 git 存储库] -> 我的 gerrit <-> 开发人员

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

Gerrit 从 freedesktop git 存储库下载更改。开发人员从 gerrit 克隆存储库并推送到 gerrit。开发人员从不将更改推送到主存储库。

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

我用 gerrit 创建了新项目。我下载存储库:

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:

我会将这个存储库推送到 gerrit,但我不能,因为我有错误:

remote: ERROR:  In commit ced219ebbd3b266ac8326223bad62f994907ae6b
remote: ERROR:  committer email address [email protected]
remote: ERROR:  does not match your user account.
remote: ERROR:
remote: ERROR:  The following addresses are currently registered:
remote: ERROR:    [email protected]
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?

我对所有人都有权限。我如何向gerrit添加镜像?

回答by Brad

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

您需要“伪造提交者”和“伪造作者”访问权限。这告诉 Gerrit 忽略您不是正在推送的提交的作者或提交者。http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/access-control.html#category_forge_author