Look at the account_external_ids table. This will record the OpenID
strings used. Some OpenID providers return different strings based on
the hostname you access your server at, e.g. "http://localhost:8080/"
would get assigned a different identifier string than
"http://review.example.com/", even if they are the same server. Google
Accounts and Yahoo both have this behavior.
> The same email seems to have two accounts created on different days.
>
> The only thing I changed was to restart Gerrit to serve on port 8081
> instead of 8080.
Yes, this would also do it. Changing the port number will also change
the OpenID strings.
To make your new "you" account an administrator you would need to find
the Administrators group in the account_groups table and then insert
your new account_id (1000001) into account_group_members table for
that group_id. After doing that restart the server to make sure the
change is visible.
Wouldn't that cause the user to still have two (mostly) duplicate
accounts? I think another solution would be to change the account_id's
in the account_external_ids table to point to the original account id.
Then you could clean up the newly created account by removing it from
the accounts table. Is there any other thing place it would need to be
removed from? (assuming that no ssh keys or anything have been added
to the account). I'm looking into using a method like the one I just
outlined to transfer our gerrit server to a new hostname.
Jason
Yes, this would also work.