Unable to change "HTTPS clone URL"

Hello,
we have 15.4.0 gitlab-ce running in container. “clone button” for SSH shows correct path including port 41022, but for HTTPS is there “http://gitlab.lab/…” without port. The question is - why?

external_url parameter has the correct value. I did the same several times on other gitlab-ce installations (ok, this is my first 15.4.0. previous conf was applied up to 15.3.x), but here it’s not working correctly. Why? It’s a bug for 15.4.0 release or something has been changed?

Based on documentation (Configuration options for the GitLab Linux package | GitLab) is our configuration correct.

Container port mapping (outside:inside):

  • ssh: 41022:22 (ssh access is working)
  • http: 41080:80 (redirection from http to https is working)
  • https: 41443:443 (https access is working)

/etc/gitlab/gitlab.rb configuration (everything else is default):

gitlab_rails['gitlab_shell_ssh_port'] = 41022
external_url "https://gitlab.lab:41443/"  #<<< this is correct
nginx['enable'] = true
nginx['http2_enabled'] = true
nginx['listen_port'] = 443
nginx['listen_https'] = true
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.lab.crt.pem"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.lab.key.pem"

gitlab-rake gitlab:env:info output:

System information
System:
Current User:   git
Using RVM:      no
Ruby Version:   2.7.5p203
Gem Version:    3.1.6
Bundler Version:2.3.15
Rake Version:   13.0.6
Redis Version:  6.2.7
Sidekiq Version:6.4.2
Go Version:     unknown

GitLab information
Version:        15.4.0
Revision:       70d9f335be4
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     12.10
URL:            https://gitlab.lab:41443 #<<< correct (based on external_url)
HTTP Clone URL: http://gitlab.lab/some-group/some-project.git #<<< it's wrong (not based on external_url)
SSH Clone URL:  ssh://git@gitlab.lab:41022/some-group/some-project.git # <<< correct
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers: 

GitLab Shell
Version:        14.10.0
Repository storage paths:
- default:      /var/opt/gitlab/git-data/repositories
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell

After config file change (/etc/gitlab/gitlab.rb) I did of course gitlab-ctl reconfigure. I tried also clear cache (gitlab-rake cache:clear) or restart whole gitlab instance. Without solving the issue.

Any ideas how to solve this issue? It’s not clear for my why it’s not working. I don’t think that configuration is not correct. Is it connected to 15.4.0 release? Is it working for you correct in latest 15.4.0 release?

Thanks for any idea how to solve it.

martin

SOLVED!

The “Custom Git clone URL for HTTP(S)” was set in “Admin Area → Settings → General”. This setting has higher priority against external_url settings. Solution: 1) clear settings in admin area (and external_url setting is used) or 2) change it :slight_smile:

Sorry for the stupid question! Maybe it will help someone in the future.

martin

1 Like