How to login Gerrit as Administrator

只愿长相守 提交于 2021-02-07 11:23:33

问题


I installed my gerrit on Ubuntu server.

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

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?


回答1:


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.




回答2:


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.




回答3:


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,



来源:https://stackoverflow.com/questions/8584660/how-to-login-gerrit-as-administrator

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!