git 如何以管理员身份登录 Gerrit
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8584660/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to login Gerrit as Administrator
提问by gemfield
I installed my gerrit on Ubuntu server.
我在 Ubuntu 服务器上安装了我的 gerrit。
As gerrit said:The first people who logined gerrit is Administrator.
正如gerrit所说:第一个登录gerrit的人是Administrator。
So I logined first with openID (google account),and I am the Administrator indeed.
所以我首先使用openID(谷歌帐户)登录,我确实是管理员。
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.
但是,当第二天我用我的谷歌帐户重新登录 gerrit 时,我成为了一个新的注册者。id是100001(管理员的id是100000),但是两个邮箱都是google的邮箱,是一样的。
What happened?
发生了什么?
回答by Kirin
The easiest way is to temporarily disable authenticated logins.
最简单的方法是暂时禁用经过身份验证的登录。
Edit your [auth] statement in gerrit.config to look like this:
将 gerrit.config 中的 [auth] 语句编辑为如下所示:
[auth]
type = development_become_any_account
And then force login as the admin, grant yourself access and then restore the [auth] config.
然后强制以管理员身份登录,授予自己访问权限,然后恢复 [auth] 配置。
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.
请记住,在此期间可以访问您服务器的任何人也可以是任何帐户,因此在完成上述步骤时,请设置防火墙或其他东西以将访问范围缩小到您的工作站。
回答by Larry Cai
gerrit automatically assign first login as administrator, and treat your google account as another id.
gerrit 自动将首次登录指定为管理员,并将您的 google 帐户视为另一个 ID。
You can either
你可以
- login with openid and add google account id into administrator group as well
- manual change the database
system_config
for your google account.
- 使用 openid 登录并将 google 帐户 id 添加到管理员组中
- 手动更改
system_config
您的 google 帐户的数据库。
Hope it gives hints.
希望能给点提示。
回答by vedang
I faced a similar issue and found Shawn Pearce's reply on the mailing list to be useful:
我遇到了类似的问题,并发现 Shawn Pearce 在邮件列表上的回复很有用:
https://groups.google.com/d/msg/repo-discuss/FkIPsL28OXM/OBJvKaMh-wgJ
https://groups.google.com/d/msg/repo-discuss/FkIPsL28OXM/OBJvKaMh-wgJ
HTH,
哈,