Page MenuHomePhabricator

Gerrit: Permission error "use a SHA1 visible to you, or get update permission on the ref" or "You need 'Create' rights to create new references." when using git-review ≤1.26
Closed, InvalidPublic

Description

If you're using git-review < 1.27, and seeing error messages like

remote: error: branch refs/publish/master:
remote: use a SHA1 visible to you, or get update permission on the ref
remote: User: <redacted>
remote: Contact an administrator to fix the permissions

or

remote: error: branch refs/publish/master:
remote: You need 'Create' rights to create new references.
remote: User: <redacted>
remote: Contact an administrator to fix the permissions

Upgrade your installed git-review. You need at least version 1.27.

(git-review relies on being able to push to refs/publish/... which got removed in Gerrit some time ago)

Upstream https://gerrit-review.googlesource.com/c/gerrit/+/274274

Event Timeline

MSantos created this task.Jun 29 2020, 6:08 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 29 2020, 6:08 PM

You need to update git-review to at least 1.27. git-review 1.26 or lower is not supported.

Paladox closed this task as Invalid.Jun 29 2020, 6:19 PM
MSantos renamed this task from Permission error with gerrit after version update to gerrit: Permission error with gerrit after version update.Jun 29 2020, 6:31 PM
Aklapper renamed this task from gerrit: Permission error with gerrit after version update to Gerrit: Permission error "use a SHA1 visible to you, or get update permission on the ref" when using git-review ≤1.26.Jun 29 2020, 7:05 PM
QChris added a subscriber: QChris.Jul 3 2020, 9:04 AM

Since this seems to be happening again and again, @Legoktm and I suggested a change Upstream at https://gerrit-review.googlesource.com/c/gerrit/+/274274 to hint users at upgrading their git-review

QChris renamed this task from Gerrit: Permission error "use a SHA1 visible to you, or get update permission on the ref" when using git-review ≤1.26 to Gerrit: Permission error "use a SHA1 visible to you, or get update permission on the ref" or "You need 'Create' rights to create new references." when using git-review ≤1.26.Jul 3 2020, 9:11 AM
QChris updated the task description. (Show Details)

Change 609590 had a related patch set uploaded (by QChris; owner: Christian Aistleitner):
[operations/software/gerrit@deploy/wmf/stable-3.2] Bump gerrit.war to Gerrit 3.2.2-102-g3bbb138e13

https://gerrit.wikimedia.org/r/609590

Change 609590 merged by QChris:
[operations/software/gerrit@deploy/wmf/stable-3.2] Bump gerrit.war to Gerrit 3.2.2-102-g3bbb138e13

https://gerrit.wikimedia.org/r/609590

We've just deployed the above change that hints towards updating git-review when pushing to refs/publish/...

Error messages are now:

remote: error: branch refs/publish/master:
remote: If you are using git-review, update to at least git-review 1.27. Otherwise:
remote: use a SHA1 visible to you, or get update permission on the ref
remote: User: <redacted>
remote: Contact an administrator to fix the permissions

and

remote: error: branch refs/publish/master:
remote: If you are using git-review, update to at least git-review 1.27. Otherwise:
remote: You need 'Create' rights to create new references.
remote: User: <redacted>
remote: Contact an administrator to fix the permissions

This will hopefully help people to see that they need to upgrade their git-review.