禁止 Gerrit 推送到 refs/for/master

发布于 2024-12-20 19:30:30 字数 370 浏览 4 评论 0原文

我昨天更新了所有项目访问权限,人们说他们今天早上无法将更改推送到存储库。在我恢复访问权限后,他们仍然无法将更改推送到存储库,只有clone工作正常。当将更改推送到远程存储库时,它说:

![remote rejected] HEAD -> refs/for/master (prohibited by Gerrit)

我们的所有其他项目都继承自所有项目的访问权限,我将访问权限更新为最低级别(即匿名 > 可以将分支推送到 refs/heads/*) 进行测试,但我发现管理员也无法将更改推送到存储库!

是否还需要添加其他设置?

I have updated the All Project access permission yesterday, people says that they cannot push changes to repository this morning. After I recovered the access permission, they still cannot push changes to repository, only clone works fine. While push changes to remote repository, it says that:

![remote rejected] HEAD -> refs/for/master (prohibited by Gerrit)

All our other projects are inherit from All project's access permission, I updated the access permission to the lowest level (i.e. Anonymous can push branch to refs/heads/*) for test, but I find that the Administrator cannot push changes to the repository too!

Is there any other settings need to add?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜点 2024-12-27 19:30:30

要推送到审阅分支(即refs/for/*),您必须为参考refs/for/refs/*设置“推送”权限。然后,您还需要参考refs/heads/*Label Code ReviewLabel verifySubmit权限进行实际的代码审查。

如果您不想进行代码审查,而是直接推送到分支,那么您的权限是正确的,但您还必须推送到 refs/heads/master,而不是 refs/对于/master

To push to the review branches (i. e. refs/for/*), you have to set the permission "Push" for the reference refs/for/refs/*. You then also need the permission Label Code Review, Label verified and Submit for the reference refs/heads/* to do the actual code review.

If you don't want code review, but push directly to the branch, then your permissions are correct, but then you also have to push to refs/heads/master, and not refs/for/master.

只有一腔孤勇 2024-12-27 19:30:30

在 Git 配置文件中添加以下行对我有用:

push=HEAD:refs/for/master

adding following line in Git config file worked for me:

push=HEAD:refs/for/master

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文