编辑电子邮件地址后无法登录 [英] Cannot login after editing email addresses

查看:622
本文介绍了编辑电子邮件地址后无法登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器上运行了 Gerrit v3.0.0 ,昨天一切正常.

I have Gerrit v3.0.0 running on my server, everything was working fine yesterday.

这是我的身份验证方法:

Here's my authentication method :

[auth]
    type = http
    emailFormat = {0}@domain.com

我不确定这是造成我问题的原因,但是我昨天可能删除了我的电子邮件地址xxx@domain.com. 今天,当尝试再次登录到UI时,出现HTTP 403错误,logs/error_log说:

I'm not sure that this is the cause of my problem but I might have deleted my email address xxx@domain.com yesterday. Today when trying to log in to the UI again, I get a HTTP 403 error and logs/error_log said :

Cannot assign external ID "username:xxx" to account 1000003; external ID already in use.

所以我继续删除了该帐户的外部ID,这可能是一个错误,因为我仍然遇到HTTP 403错误和logs/error_log中的以下消息:

So I went ahead and deleted external IDs for this account which was probably a mistake since I still got the HTTP 403 error and the following messages in logs/error_log :

[HTTP-71] WARN  com.google.gerrit.server.account.AccountManager : Email xxx@domain.com is already assigned to account 1000001; cannot create external ID gerrit:xxx with the same email for account 1000057.
[HTTP-71] ERROR com.google.gerrit.httpd.auth.container.HttpLoginServlet : Unable to authenticate user "xxx"
com.google.gerrit.server.account.AccountException: Email 'xxx@domain.com' in use by another account

所以Gerrit似乎试图创建一个新帐户而不是登录我的帐户.

So it seems as if Gerrit tries to create a new account instead of logging into mine.

请注意,该实例上还有另一个用户,他仍然可以使用Gerrit UI. 我已经搜索过一些以前的主题,但是似乎没有解决方案.

Note that there is another user on the instance and he can still use Gerrit UI. I've searched some previous topics but no solutions seem to work.

推荐答案

所以看来我毕竟在正确的道路上.

So it appears I was on the right path after all.

我做了什么:

错误原因

我更改了我帐户的电子邮件,然后更改了首选电子邮件. Gerrit似乎不支持它,并且将外部ID搞砸了.

I changed the email of my account, and then changed the preferred email. Gerrit doesn't seem to support that and messed up with the external-id's.

第二个错误的原因

我删除了我无法登录的帐户的外部ID(可以使用API​​端点

I deleted the external-id for the account I couldn't log in to (Either use API endpoints https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html or fetch All-Users:refs/meta/external-id)

但是我不仅删除了mailto:<my_username>@<domain>.com外部ID,还删除了gerrit:<my_username>.

But I deleted not only the mailto:<my_username>@<domain>.com external-id but also gerrit:<my_username>.

此后,我没有尝试过让我再次登录.

After that, nothing I tried allowed me to log back in again.

解决方案

我在All-Users中创建了一个新的external-id:refs/meta/external-id,内容如下:

I created a new external-id in All-Users:refs/meta/external-id with the following:

[externalId "gerrit:<my_username>"]
    accountId = <my_account_id>
    email = <my_username>@<domain>.com

注意:此文件的名称是gerrit:<my_username>的SHA1.

Note: the name of this file is the SHA1 of gerrit:<my_username>.

我将更改推送到Gerrit

I pushed my changes to Gerrit

注意:您需要编辑All-Users访问权限,然后才能进行推送.

Note: You need to edit All-Users accesses in order to be allowed to push this.

这一切再次奏效.

随意添加任何内容,可能并不十分详尽.

Feel free to add anything to this, it might not be very thorough.

这篇关于编辑电子邮件地址后无法登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆