Clone/Push/Pull with LDAP authentication fails
Created by: Falconne
On 5.1.0 stable, LDAP authentication does work for logging into the web interface, but not for cloning over http (authentication fails).
I noticed that someone has tried to fix this in master so I pulled their changes into my environment, but even that didn't fix the problem for me. The remaining issue was that the current code in master only authenticates a user in LDAP if that user doesn't exist in the Gitlab database. But when an LDAP user logs into the web interface, a user entry is created for them, so the code no longer checks against LDAP.
I added my comment to the relevant code (with what I did to fix it in my environment) here: https://github.com/gitlabhq/gitlabhq/commit/20a88f5c43efa3ab0af80d26c90268132e6f7997#commitcomment-3167528
Since I don't know the code well enough I don't want to make my own pull request... the way I fixed it is unlikely to be a good way to do it. It would be better to explicitly detect if a user is an LDAP user instead of just trying all authentication.