My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1718: Cannot create annotated tag
3 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Feb 2013


Sign in to add a comment
 
Reported by nereu...@gmail.com, Dec 11, 2012
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version:2.5

What steps will reproduce the problem?
1. Create gerrit project 'hello' and group 'hello-devs'
2. Give 'Create Reference' and 'Push Annotated Tag' rights to 'hello-devs' group
3. Clone gerrit project 'hello' and create annotated tag atag1 and push

What is the expected output? What do you see instead?
[expected output]
$ git push local atag1
Counting objects: 1, done.
Writing objects: 100% (1/1), 158 bytes, done.
Total 1 (delta 0), reused 0 (delta 0)
remote: Processing changes: refs: 1, done    
To ssh://nereusuj@local:29418/hello/hello
 * [new tag]         atag1 -> atag1

[result output]
git push origin atag1
Counting objects: 991, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (330/330), done.
Writing objects: 100% (991/991), 819.23 KiB, done.
Total 991 (delta 555), reused 850 (delta 532)
remote: Resolving deltas: 100% (555/555)
remote: Branch refs/tags/atag1:
remote: You are not allowed to perform this operation.
remote: To create new references you need 'Create Reference' rights.
remote: User: nereusuj
remote: Please read the documentation and contact an administrator
remote: if you feel the configuration is incorrect
remote: Processing changes: refs: 1, done    
To ssh://nereusuj@origin:29418/hello/hello
 ! [remote rejected] atag1 -> atag1 (prohibited by Gerrit)
error: failed to push some refs to 'ssh://nereusuj@origin:29418/hello/hello'

Please provide any additional information below.
I can push simple tag with 'Create Reference' right as expected.
Dec 11, 2012
Project Member #1 edwin.ke...@gmail.com
For which refs did you assign the 'Create Reference' and 'Push Annotated Tag' access rights? Are they for 'refs/tags/*'?
Dec 12, 2012
#2 nereu...@gmail.com
sure. 'refs/tags/*'
Jan 31, 2013
#3 kan....@gmail.com
I think it happens because the "Tagger" of the tag is wrong. You could see it with "git show <tagname>". Either modify it or add "Forge Committer Identity" permission too.
Jan 31, 2013
#4 kan....@gmail.com
If it is the case, then this is an issue in gerrit, because reported error is misleading.
Jan 31, 2013
Project Member #5 edwin.ke...@gmail.com
The 'prohibited by Gerrit' error well explained in the Gerrit documentation:
  https://gerrit-review.googlesource.com/Documentation/error-prohibited-by-gerrit.html

Feb 1, 2013
#6 kan....@gmail.com
Yes, this document gave me idea that I need to check. And found out the issue with a tagger name. However, the reported error "you need 'Create Reference' rights" was misleading and I spent a lot of time to figuring it out. Is it possible to improve the message so that it will report more accurate error cause?
Feb 1, 2013
Project Member #7 edwin.ke...@gmail.com
Yes, the error message "you need 'Create Reference' rights" is wrong and misleading. In current master (will be 2.6) it is already removed [1].

I've now also cherry-picked this commit for 2.5.2 [2].

[1] https://gerrit-review.googlesource.com/41510
[2] https://gerrit-review.googlesource.com/41849
Feb 6, 2013
Project Member #8 edwin.ke...@gmail.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.5.2
Feb 12, 2013
Project Member #9 edwin.ke...@gmail.com
(No comment was entered for this change.)
Status: Released
Sign in to add a comment

Powered by Google Project Hosting