Disabling HTTP access makes CI fail, the gitlab-ci-token user can't clone anymore
Summary
Disabling HTTP access makes CI fail, the gitlab-ci-token user can't clone anymore.
Steps to reproduce
-
Disable HTTP access globally
-
Push something that'll be CI'd.
-
Get output like:
Running with gitlab-ci-multi-runner 9.3.0 (3df822b) on gitlabrunner-1003.example.com / shared / docker (a67aa72e) Using Docker executor with image ruby:2.1 ... Using docker image sha256:7d04174bf9e6e7e83b99d58c46dd13178738a6d3dd3a374317c4e7c8675435ac for predefined container... Pulling docker image ruby:2.1 ... Using docker image ruby:2.1 ID=sha256:223d1eaa9523fa64e78f5a92b701c9c11cbc507f0ff62246dbbacdae395ffea3 for build container... Running on runner-a67aa72e-project-105-concurrent-0 via gitlabrunner-1003.example.com... Cloning repository... Cloning into '/builds/puppet/yum'... remote: Git access over HTTP is not allowed fatal: unable to access 'https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.example.com/puppet/yum.git/': The requested URL returned error: 403 ERROR: Job failed: exit code 1
What is the current bug behavior?
It'll try to clone over HTTP.
What is the expected correct behavior?
Gitlab's own software should use configured auth methods. Seems like a bug in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4696
Results of GitLab environment info
$ sudo gitlab-rake gitlab:env:info
System information
System: CentOS 7.3.1611
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Redis Version: 3.2.5
Git Version: 2.11.1
Sidekiq Version:5.0.0
GitLab information
Version: 9.2.6-ee
Revision: 0f19285
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
DB Version: 9.6.2
URL: https://gitlab.example.com
HTTP Clone URL: https://gitlab.example.com/some-group/some-project.git
SSH Clone URL: git@gitlab.example.com:some-group/some-project.git
Elasticsearch: yes
Geo: no
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 5.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
The only failing thing is:
Elasticsearch version 5.1 - 5.3? ... no, you have 5.4.0
Which seems irrelevant to this.