LDAP pull/clone/push over HTTP: HTTP Basic: Access denied in 10.6.0 and 10.6.1
Summary
After upgrade to 10.6.0 and also 10.6.1 (from 10.5.6) Pull/clone/push over HTTP and LDAP authentication is not possible anymore: remote: HTTP Basic: Access denied
This issue can also be found by members in forum: https://forum.gitlab.com/t/pull-push-over-http-s-with-ldap-failed-after-upgrade-to-10-6-0/14907/8
Steps to reproduce
- LDAP User Sync
- User name different from LDAP account name
- Pull/clone/push over http
git clone http://url-to-server.com/namespace/project.git
Example Project
no
What is the current bug behavior?
Git opens the credential manager and after entering the correct credentials git throws:
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://url-to-server.com/namespace/project.git
What is the expected correct behavior?
A successfull Pull/clone/push
Relevant logs and/or screenshots
==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/" for 172.17.0.1 at 2018-03-29 07:04:18 +0000
Started GET "/" for 172.17.0.1 at 2018-03-29 07:04:18 +0000
Processing by RootController#index as HTML
Processing by RootController#index as HTML
Redirected to http://url-to-server.com/users/sign_in
Filter chain halted as :redirect_unlogged_user rendered or redirected
Completed 302 Found in 4ms (ActiveRecord: 0.0ms | Elasticsearch: 0.0ms)
==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/namespace/project.git/info/refs","format":"*/*","controller":"Projects::GitHttpController","action":"info_refs","status":401,"duration":68.04,"view":0.69,"db":7.82,"time":"2018-03-29T07:05:25.021Z","params":[{"key":"service","value":"git-upload-pack"},{"key":"namespace_id","value":"namespace"},{"key":"project_id","value":"project.git"}],"remote_ip":"172.17.0.1","user_id":null,"username":null}
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Proxy: no Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknown
GitLab information Version: 10.6.1-ee Revision: a45e9e9 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: http://url-to-server.com HTTP Clone URL: http://url-to-server.com/some-group/some-project.git SSH Clone URL: ssh://git@url-to-server.com:2222/some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 6.0.4 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 6.0.4 ? ... OK (6.0.4) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 5/1 ... ok 5/2 ... ok 5/3 ... ok 5/4 ... ok 21/9 ... ok 5/10 ... ok 5/11 ... ok 2/23 ... ok 2/25 ... ok 5/26 ... ok 30/27 ... ok 30/28 ... ok 35/29 ... ok 35/30 ... ok 30/31 ... ok 30/32 ... ok 30/34 ... ok 29/35 ... ok 35/36 ... ok 35/37 ... ok 29/38 ... ok 38/39 ... ok 30/40 ... ok 38/41 ... ok 38/42 ... ok 38/43 ... ok 38/44 ... ok 30/45 ... ok 26/47 ... ok 29/48 ... ok 2/49 ... ok 24/50 ... ok 29/51 ... ok 29/52 ... ok 34/53 ... ok 24/54 ... ok 16/55 ... ok 45/56 ... ok 30/57 ... ok 20/58 ... ok 2/59 ... ok 27/60 ... ok 9/61 ... ok 2/62 ... ok 30/64 ... ok 35/65 ... ok 18/66 ... ok 2/67 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) (removed output of > 100 users)
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 5/1 ... yes 5/2 ... yes 5/3 ... yes 5/4 ... yes 21/9 ... yes 5/10 ... yes 5/11 ... yes 2/23 ... yes 2/25 ... yes 5/26 ... yes 30/27 ... yes 30/28 ... yes 35/29 ... yes 35/30 ... yes 30/31 ... yes 30/32 ... yes 30/34 ... yes 29/35 ... yes 35/36 ... yes 35/37 ... yes 29/38 ... yes 38/39 ... yes 30/40 ... yes 38/41 ... yes 38/42 ... yes 38/43 ... yes 38/44 ... yes 30/45 ... yes 26/47 ... yes 29/48 ... yes 2/49 ... yes 24/50 ... yes 29/51 ... yes 29/52 ... yes 34/53 ... yes 24/54 ... yes 16/55 ... yes 45/56 ... yes 30/57 ... yes 20/58 ... yes 2/59 ... yes 27/60 ... yes 9/61 ... yes 2/62 ... yes 30/64 ... yes 35/65 ... yes 18/66 ... yes 2/67 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.9.5 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 28 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished
Possible fixes
I have no idea :-/