Search code examples
gitgerrit

How to delete project with a trailing whitespace from gerrit


I'm trying to remove the project from Gerrit of version 2.16.2 without success.

The project is created (by mistake) with a trailing space: "ui "

I do have a "delete-project" plugin installed, and use the command:

ssh -p 29418 <my-user>@<ip-of-my-gerrit-server> delete-project delete --yes-really-delete "ui%20"

But it responds with:

fatal: project ui%20 not found

I've also tried other options like:

"ui"
"ui%20"
"ui "
"ui+"
"ui*"
// the same as above with single quotes or without quotes at all

Nothing works and the same error appears over and over again. So the question is what is the exact command I should use in this case?

I've always tried to delete the project via UI, but it returns 404 page, so probably it doesn't work.

This is an empty repository and I don't have any reviews on it.


Solution

  • Deleting projects with "non-conventional" names does not seem to be directly supported by gerrit at the moment (June 2021).

    Cases in point:

    • Issue 14105: "Unable to delete project with ampersand in name", reported in Feb. 2021.
    • Issue 14048: "When the project name is created with '-' at the beginning, it cannot be deleted by gerrit 'Delete Project' menu or ssh command."