Skip to content

Username / email already taken

When creating new users, gitlab will refuse the request if a user with the given username or e-mail address already exists.

The logs reveal that occasionally, this happens even when just prior we queried for the exact same username and email address, and didn't find anything for either, which suggests that both the name and the address don't exist in gitlab yet. But still it fails.

Further evidence: the usernames in question do actually exist in the database, but casing differs (e.g. samb vs. SamB).

Hypothesis: gitlab, at least the API, is inconsistent wrt case sensitivity in usernames and passwords; it seems that querying is case sensitive, while the uniqueness check is not.

Unfortunately, I don't have a good solution for this right now.