diff --git a/Documentation/error-prohibited-by-gerrit.txt b/Documentation/error-prohibited-by-gerrit.txt index 56e585168e..bad2b3c060 100644 --- a/Documentation/error-prohibited-by-gerrit.txt +++ b/Documentation/error-prohibited-by-gerrit.txt @@ -17,11 +17,15 @@ In particular this error occurs: 3. if you push an annotated tag without link:access-control.html#category_push_annotated['Push Annotated Tag'] access right on 'refs/tags/*' -4. if you push a lightweight tag without the access right link:access-control.html#category_create['Create +4. if you push a signed tag without + link:access-control.html#category_push_signed['Push Signed Tag'] + access right on 'refs/tags/*' +5. if you push a lightweight tag without the access right link:access-control.html#category_create['Create Reference'] for the reference name 'refs/tags/*' -5. if you push a tag with somebody else as tagger and you don't have the +6. if you push a tag with somebody else as tagger and you don't have the link:access-control.html#category_forge_committer['Forge Committer'] access right for the reference name 'refs/tags/*' +7. if you push to a project that is in state 'Read Only' For new users it often happens that they accidentally try to bypass code review. The push then fails with the error message 'prohibited diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java index 9200db4174..18988c968a 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java @@ -154,9 +154,7 @@ public class ReceiveCommits { + "flag set to delete references."), DELETE_CHANGES("Cannot delete from 'refs/changes'"), CODE_REVIEW("You need 'Push' rights to upload code review requests.\n" - + "Verify that you are pushing to the right branch."), - CREATE("You are not allowed to perform this operation.\n" - + "To create new references you need 'Create Reference' rights."); + + "Verify that you are pushing to the right branch."); private final String value; @@ -883,7 +881,6 @@ public class ReceiveCommits { validateNewCommits(ctl, cmd); batch.addCommand(cmd); } else { - errors.put(Error.CREATE, ctl.getRefName()); reject(cmd); } }