Hello!
I have a list of incorrectly created changes (for already-merged commits) which I want to delete completely and recreate with proper owners.
Using rest api for this:
curl -v --user dhabensky:$GERRIT_PASS -X DELETE "https://gerrit.yandex-team.ru/a/changes/72052"
But the answer is:
405 Method Not Allowed
delete not permitted
I tried this with multiple change-id notations, for multiple changes, all with same result.
I am the owner of this change and also an administrator, so gerrit should allow me to do this.
I suspect that authorization (using /a/changes instead of /changes) is a deal-breaker here, but we dont allow any anonymous access to our gerrit instance.
How can I delete such change?
Gerrit 3.11.1
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/ec91fe27-cdfc-4ebd-8276-ab9a8baf7cfcn%40googlegroups.com.
On 11 Jun 2025, at 18:02, Denis Khabensky <dhab...@gmail.com> wrote:Im not speaking about deleting actual commits in repositories - they existed long before and should continue forever.
Im interested only in deleting change information from notedb, so we can recreate changes for the same commits but with proper data.
So I dont need a complete surgery.
But I also cannot revert commits - time has passed since they were created, this is what looks like a complex surgery now.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/6b00a49d-cbd6-4fbd-9be1-2a890d20b1f8n%40googlegroups.com.
> Why don’t you just remove the refs/changes/* pointing to those commits and run an offline reindex then?How can I do so / which permissions do I need?
I tried to delete change 72091, with the following errors (I am in group Administrators):
git push --delete origin refs/changes/91/72091/1
remote: error: branch refs/changes/91/72091/1:
remote: Cannot delete from 'refs/changes/'
remote: User: dhabensky
remote: Contact an administrator to fix the permissions
remote: Processing changes: refs: 1, done
To ssh://gerrit.yandex-team.ru/dhabensky-test
! [remote rejected] refs/changes/91/72091/1 (The ref refs/changes/91/72091/1 doesn't exist)
error: failed to push some refs to 'ssh://gerrit.yandex-team.ru/dhabensky-test'
git push --delete origin refs/changes/91/72091/meta -o notedb=allow
remote: Processing changes: refs: 1, done
remote: ACL info:
...
To ssh://gerrit.yandex-team.ru/dhabensky-test
! [remote rejected] refs/changes/91/72091/meta (NoteDb update requires access database permission)
error: failed to push some refs to 'ssh://gerrit.yandex-team.ru/dhabensky-test'
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/4c67ac09-ac29-4ed4-a1c8-1bfa9bb76ac0n%40googlegroups.com.