[2020-04-24 11:39:12,620] [HTTP-641] WARN com.google.gerrit.httpd.auth.ldap.LdapLoginServlet : '<username>' failed to sign in
com.google.gerrit.server.account.AccountException: Cannot assign external ID "username:<username>" to account 1001056; external ID already in use.
Thanks,Balázs--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/b2aefd77-4276-4d6b-b37e-2066b47bd60d%40googlegroups.com.
GET /accounts/1000245/detail
)]}'
{
"registered_on": "<...>",
"_account_id": 1000245,
"name": "<...>",
"username": "<username>"
}
GET /accounts/1001051/detail
Account '1001051' is not found or ambiguous
On 27 Apr 2020, at 09:43, Balázs Bayer <balazs...@gmail.com> wrote:Hi Luca,Thanks for pointing this out. Issue 10910 looks relevant. How can I get the external_ids? Gerrit release: 2.16.3
git clone /gerrit/gerrit/git/All-Users.git/
cd All-Users/
git fetch origin refs/meta/external-ids:refs/meta/external-ids
git checkout refs/meta/external-ids
echo -n "gerrit:rajravic" | sha1sum
vim fe/08d7216cf81192179f780b6feab8246addbe07
git add *
git commit -m "Correcting 1012182 - rajravic"
git push origin HEAD:refs/meta/external-ids
On 27 Apr 2020, at 09:43, Balázs Bayer <balaz...@gmail.com> wrote:Hi Luca,Thanks for pointing this out. Issue 10910 looks relevant. How can I get the external_ids? Gerrit release: 2.16.3Can you follow-up on the issue?That would help other people having the same problem, so they can just follow the discussion on the issue.Luca.
On 27 Apr 2020, at 09:26, Balázs Bayer <balaz...@gmail.com> wrote:Hi all,when an LDAP user tries to log in, the following message appears in error_log:[2020-04-24 11:39:12,620] [HTTP-641] WARN com.google.gerrit.httpd.auth.ldap.LdapLoginServlet : '<username>' failed to sign in
com.google.gerrit.server.account.AccountException: Cannot assign external ID "username:<username>" to account 1001056; external ID already in use.
In All-Users repository there is no branchrefs/remotes/origin/users/../1001056Can you please advise, how to solve this issue?Have you looked for existing issues on that topic?See:Which version are you running?Luca.
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.
Hi Luca,Thanks for pointing this out. Issue 10910 looks relevant. How can I get the external_ids? Gerrit release: 2.16.3Balázs
On Mon, 27 Apr 2020 at 10:31, Luca Milanesio <luca.m...@gmail.com> wrote:
On 27 Apr 2020, at 09:26, Balázs Bayer <balaz...@gmail.com> wrote:Hi all,when an LDAP user tries to log in, the following message appears in error_log:[2020-04-24 11:39:12,620] [HTTP-641] WARN com.google.gerrit.httpd.auth.ldap.LdapLoginServlet : '<username>' failed to sign in
com.google.gerrit.server.account.AccountException: Cannot assign external ID "username:<username>" to account 1001056; external ID already in use.
In All-Users repository there is no branchrefs/remotes/origin/users/../1001056Can you please advise, how to solve this issue?Have you looked for existing issues on that topic?See:Which version are you running?Luca.
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/edbd3198-2d56-4650-90f7-30ea16147fc3%40googlegroups.com.
To unsubscribe, email repo-d...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/edbd3198-2d56-4650-90f7-30ea16147fc3%40googlegroups.com.
$ cp -rp /<your path>/All-Users.git /<your path>/All-Users.git.bak
$ mkdir ~/All-Users.nonbare
$ cp -r /data/git/All-Users.git ~/All-Users.nonbare/.git
$ cd ~/All-Users.nonbare
$ git config core.bare false
$ git checkout refs/meta/external-ids
$ git remote add origin /<your path>/All-Users.git
$ git revert <commit that you found bit looking through git log for "Unlink">
$ git push origin HEAD:refs/meta/external-ids
> To unsubscribe, email repo-d...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to repo-d...@googlegroups.com
> <mailto:repo-discuss+unsub...@googlegroups.com>.
Hi AndrewI did not really understand what type of issue you are solving with that method. Maybe I misunderstood you.However, I found a workaround for my case.I started with removing my user by cloning the All-Users.git/ a variant to Raj Ravis instructions.Next step was to login with my account again and a new user without any privileges was created.I cloned again All-Users.git/ and then changed the ID for the newly created user to the same as my original.Then logged in again and then I had all my administration priviligies again.Note that I stopped and started Gerrit between each change.Note also that I had a very old installation of Gerrit and the oauth plgin that might explain why I still got this problem.
Hello All,Re-opening a very old thread.But just wanted some information regarding the user not being able to login.We have a user who is able to login through LDAP authentication. We want to migrate to using SSO. This particular user is not able to login.When he tries to login, it says "Forbidden".And in gerrit log it gives an error as below[2025-09-03T09:14:43.458+03:00] [HTTP-6968] ERROR com.google.gerrit.server.account.externalids.storage.notedb.ExternalIdNotes : Ignoring invalid external ID note a71f09972f485d8d62327ff5cfc073131ec9ae64
org.eclipse.jgit.errors.ConfigInvalidException: Invalid external ID config for note 'a71f09972f485d8d62327ff5cfc073131ec9ae64': SHA1 of external ID 'gerrit:TESTING' does not match note ID 'a71f09972f485d8d62327ff5cfc073131ec9ae64'The repo was migrated from 2.10 to 3.9 hence it contains two entries "username:<user-id>" and "gerrit:<user-id>". For this particular user, gerrit:<userid> is stored in uppercase and username:<userid> is stored in lower case. For all other users, both are stored in lower case.We tried the steps provided above by Raj Ravi. Since we were not able to understand what exactly needs to do in the vim step, we tried to delete the external id. But then it started giving me an error "external-id is already being used"Only one user is having this issue, but we cannot move to SSO without resolving it.Thanks in advance for any help/suggestion
Thanks,SwetaOn Thursday, 30 July 2020 at 21:01:55 UTC+5:30 David Ostrovsky wrote:
Am Donnerstag, 30. Juli 2020 04:34:29 UTC+2 schrieb Anders Persson:Hi AndrewI did not really understand what type of issue you are solving with that method. Maybe I misunderstood you.However, I found a workaround for my case.I started with removing my user by cloning the All-Users.git/ a variant to Raj Ravis instructions.Next step was to login with my account again and a new user without any privileges was created.I cloned again All-Users.git/ and then changed the ID for the newly created user to the same as my original.Then logged in again and then I had all my administration priviligies again.Note that I stopped and started Gerrit between each change.Note also that I had a very old installation of Gerrit and the oauth plgin that might explain why I still got this problem.I don't think that the issue you are seeing, or referenced byAndrew Grimberg is related to oauth plugin.I believe, that these issues are related: [1], [2] that were fixedin this CL: [3].
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/bccd2fd3-725e-481a-b6a7-014d10541d92n%40googlegroups.com.
On Mon, Sep 15, 2025 at 7:01 AM Sweta Asnodkar <sweta.notim...@gmail.com> wrote:
Hello All,Re-opening a very old thread.But just wanted some information regarding the user not being able to login.We have a user who is able to login through LDAP authentication. We want to migrate to using SSO. This particular user is not able to login.When he tries to login, it says "Forbidden".And in gerrit log it gives an error as below[2025-09-03T09:14:43.458+03:00] [HTTP-6968] ERROR com.google.gerrit.server.account.externalids.storage.notedb.ExternalIdNotes : Ignoring invalid external ID note a71f09972f485d8d62327ff5cfc073131ec9ae64
org.eclipse.jgit.errors.ConfigInvalidException: Invalid external ID config for note 'a71f09972f485d8d62327ff5cfc073131ec9ae64': SHA1 of external ID 'gerrit:TESTING' does not match note ID 'a71f09972f485d8d62327ff5cfc073131ec9ae64'The repo was migrated from 2.10 to 3.9 hence it contains two entries "username:<user-id>" and "gerrit:<user-id>". For this particular user, gerrit:<userid> is stored in uppercase and username:<userid> is stored in lower case. For all other users, both are stored in lower case.We tried the steps provided above by Raj Ravi. Since we were not able to understand what exactly needs to do in the vim step, we tried to delete the external id. But then it started giving me an error "external-id is already being used"Only one user is having this issue, but we cannot move to SSO without resolving it.Thanks in advance for any help/suggestionIf a single account is affected I would delete all its external-ids. Then the user should be able tocreate a new Gerrit account on the next login. Another option is to migrate to case-insensitive usernameswhich are supported since Gerrit 3.5 [1].
Now all users get error "Forbidden" when trying to login.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/229a96cd-2113-4eb5-b158-813fb47b7c55n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/85903484-d203-4efa-bae6-5a406f5a23f1n%40googlegroups.com.