Search code examples
ubuntugerritaccountadministrator

Gerrit no administrator account - How to create an admin account?


I am having trouble with my new gerrit installation on our server. The first account that logs in should be the administrator account, but... It isn't. I don't have access to creating groups, managing permissions and whatnot. I tried the solution here: How to login Gerrit as Administrator? , which allows to log in as any account, but it doesn't help because none of the accounts have administrator priviledges. I get this screen:

Login Screen

But I can only log in as any of the 2 existing accounts, none of which are administrators. I created a third one using the New Account button, but it doesn't have administrator priviledges either so it doesn't help. Note that the first ID I get is 1000001, which makes me think there could be another hidden administrator account under 1000000, but trying to connect to that ID gives me "Account not found".

The question becomes: how can I manually make one of those accounts an administrator account, or how do I create a new administrator account to fix the issue?

Side Note: could this issue be linked to the fact that I am using LDAP to authenticate but the linux machine does not use the LDAP for its accounts? I previously tested an instance of Gerrit on a Windows Server and I didn't have this issue but it was using the same LDAP as the one I configured for gerrit.


Solution

  • After wasting days on this...

    Only solution I found was to nuke the whole thing and start over and this time I guess I got lucky and my account has the proper admin rights.

    If you have to resort to this, deleting the gerrit site repository isn't sufficient. You also have to delete the "All-Projects.git" and "All-Users.git" folders in your git repository if it's outside of your gerrit site.