external_url ignores 'https'
Summary
After an update to v.10.5 gitlab/nginx ignores the 'https' part in the external_url parameter
Steps to reproduce
- Install gitlab pre v.10.5 and configure it so that it runs on https only via the line
external_url 'https://example.com'. You can also useexternal_url 'https://example.com:443 - Make sure everything is working correctly (certificates etc.) There is no http access to the installation.
- Upgrade to v.10.5
- If you already have something running on port 80, nginx will now complain that it can't bind on port 80.
- OK, you can get around that by using
external_url 'http://example.com:81but then there is no https access. - It seems that using https in external url gitlab now always tries to open port 80 which it shouldn't.
Example Project
No project needed
What is the current bug behavior?
- No https / can't disable http
What is the expected correct behavior?
- Gitlab should behave the way it did before. If I set external_url to https it should not use http
Relevant logs and/or screenshots
- It is all in the description
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 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.5.1 Revision: 21c2ffe Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://gitlab.leanfive.com:444 #Using http port 444 as https tries to open port 80 which is already used. In the previous version this line was https://gitlab.leanfive.com HTTP Clone URL: http://gitlab.leanfive.com:444/some-group/some-project.git SSH Clone URL: git@gitlab.leanfive.com:some-group/some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 6.0.3 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
System information System: Ubuntu 16.04 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.5.1 Revision: 21c2ffe Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://gitlab.leanfive.com:444 HTTP Clone URL: http://gitlab.leanfive.com:444/some-group/some-project.git SSH Clone URL: git@gitlab.leanfive.com:some-group/some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 6.0.3 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git root@zeus:/etc/gitlab# gitlab-rake gitlab:check SANITIZE=true Checking GitLab Shell ...
GitLab Shell version >= 6.0.3 ? ... OK (6.0.3) 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: ... 4/2 ... ok 4/3 ... ok 4/4 ... ok 4/5 ... ok 4/6 ... ok 4/7 ... ok 4/8 ... ok 4/9 ... ok 4/10 ... ok 4/11 ... 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... Anonymous. No bind_dn or password configured
LDAP users with access to your GitLab server (only showing the first 100 results)
DN: cn=ldap,ou=users,dc=leanfive,dc=com cn: ldap
DN: cn=,ou=users,dc=leanfive,dc=com cn:
DN: cn=,ou=users,dc=leanfive,dc=com cn:
DN: cn=,ou=users,dc=leanfive,dc=com cn:
DN: cn=,ou=users,dc=leanfive,dc=com cn:
DN: cn=,ou=users,dc=leanfive,dc=com cn:
DN: cn=,ou=users,dc=leanfive,dc=com cn:
DN: cn=,ou=deprecated,ou=users,dc=leanfive,dc=com cn:
DN: cn=,ou=deprecated,ou=users,dc=leanfive,dc=com cn:
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: ... 4/2 ... yes 4/3 ... yes 4/4 ... yes 4/5 ... yes 4/6 ... yes 4/7 ... yes 4/8 ... yes 4/9 ... yes 4/10 ... yes 4/11 ... 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: ... 8
Checking GitLab ... Finished