How to login Gerrit as Administrator

I installed my gerrit on Ubuntu server.

As gerrit said:The first people who logined gerrit is Administrator.

  • How can one take several top-level projects in Gerrit and move them under another “container” project?
  • Find out whether a branch contains unmerged changes
  • Git\Gerrit remote rejected with “missing Change-Id in commit message footer”
  • How to set default remote ref in TortoiseGit?
  • gerrit: push: no changes between prior commit and new commit. Not able to pull changes
  • Different branch definitions for git push
  • So I logined first with openID (google account),and I am the Administrator indeed.

    But,when next day I relogin gerrit with my google account, I become a new register. The id is 100001(Administrator ‘s id is 100000),but both email are google’s email,and are same.

    What happened?

  • How can I keep track of where commits came from once they've been merged?
  • Can a lightweight tag be converted to an annotated tag?
  • I'm getting a 'insufficient permission…' error when trying to push to my bare repo on my linux AWS server
  • Git alias for re-merging with the lastest from master
  • How do I force Git to use the owner and permissions of the enclosing folder?
  • How to list all Git tags?
  • 3 Solutions collect form web for “How to login Gerrit as Administrator”

    The easiest way is to temporarily disable authenticated logins.

    Edit your [auth] statement in gerrit.config to look like this:

    [auth]
    type = development_become_any_account
    

    And then force login as the admin, grant yourself access and then restore the [auth] config.

    Keep in mind that anyone with access to your server during this time will also be able to be any account, so setup a firewall or something to narrow access down to just your workstation while you complete the above steps.

    gerrit automatically assign first login as administrator, and treat your google account as another id.

    You can either

    1. login with openid and add google account id into administrator group as well
    2. manual change the database system_config for your google account.

    see https://gerrit-documentation.storage.googleapis.com/Documentation/2.12.2/access-control.html#administrators

    Hope it gives hints.

    I faced a similar issue and found Shawn Pearce’s reply on the mailing list to be useful:

    https://groups.google.com/d/msg/repo-discuss/FkIPsL28OXM/OBJvKaMh-wgJ

    HTH,

    Git Baby is a git and github fan, let's start git clone.