Repository content ist hardlinked to "external_url"

Summary

The Links inside the repository/files area are related to the "external_url" variable since releas 12.8.0. All other links like menu entries are related to the originally called URL. This makes it uncomfortable to work with the gitlab instance behind a reverse proxy or with any working non-external_url address.

Steps to reproduce

Open your gitlab instance (version >= 12.8.0) with the IP address instead of the domain name. Compare the links shown for menuentries with the links shown inside the content of the Repository / Files.

Example Project

any project

What is the current bug behavior?

Links of the content are related to "external_url"

What is the expected correct behavior?

Links of the content are related to the original URL

Relevant logs and/or screenshots

Output of checks

Not reproducable on gitlab.com due to prohibition to open site via IP address

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:         Ubuntu 18.04
Proxy:          HTTPS_PROXY: http://***
                no_proxy: localhost,127.0.0.1,localaddress,.localdomain.com,***
                NO_PROXY: localhost,127.0.0.1,localaddress,.localdomain.com,***
                ftp_proxy: http://***
                FTP_PROXY: http://***
                HTTP_PROXY: http://***
                https_proxy: http://***
                http_proxy: http://***
Current User:   git
Using RVM:      no
Ruby Version:   2.6.5p114
Gem Version:    2.7.10
Bundler Version:1.17.3
Rake Version:   12.3.3
Redis Version:  5.0.7
Git Version:    2.24.1
Sidekiq Version:5.2.7
Go Version:     unknown

GitLab information
Version:        12.9.2-ee
Revision:       0ad76f4d374
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     10.12
URL:            https://ngitlab.ocn.ipls.t-systems.com
HTTP Clone URL: https://ngitlab.ocn.ipls.t-systems.com/some-group/some-project.git
SSH Clone URL:  git@ngitlab.ocn.ipls.t-systems.com:some-group/some-project.git
Elasticsearch:  no
Geo:            no
Using LDAP:     yes
Using Omniauth: yes
Omniauth Providers:

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

Results of GitLab application Check

Expand for output related to the GitLab application check

Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 12.0.0 ? ... OK (12.0.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 32 users of 100 limit.

Checking LDAP ... Finished

Checking GitLab App ...

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: ... 20/29 ... yes 17/33 ... yes 17/35 ... yes 20/37 ... yes 20/38 ... yes 20/39 ... yes 20/40 ... yes 20/41 ... yes 20/42 ... yes 20/43 ... yes 5/44 ... yes 16/45 ... yes 4/46 ... yes 17/47 ... yes 2/49 ... yes 31/53 ... yes 30/54 ... yes 16/57 ... yes 16/58 ... yes 16/60 ... yes 36/62 ... yes 36/63 ... yes 36/64 ... yes 16/65 ... yes 16/66 ... yes 16/67 ... yes 16/68 ... yes 16/69 ... yes 16/70 ... yes 16/71 ... yes 16/72 ... yes 30/74 ... yes 16/75 ... yes 16/77 ... yes 16/78 ... yes 43/83 ... yes 16/84 ... yes 16/86 ... yes 44/88 ... yes 16/89 ... yes 16/90 ... yes 16/91 ... yes 47/92 ... yes 16/96 ... yes 46/97 ... yes 17/99 ... yes 17/100 ... yes 46/101 ... yes 46/102 ... yes 17/103 ... yes 49/105 ... yes 39/110 ... yes 40/111 ... yes 40/112 ... yes 40/114 ... yes 17/115 ... yes 4/116 ... yes 30/117 ... yes 8/119 ... yes 42/122 ... yes 2/124 ... yes 16/125 ... yes 16/126 ... yes 17/127 ... yes 54/128 ... yes 54/129 ... yes 54/130 ... yes 8/131 ... yes 8/132 ... yes 20/133 ... yes 16/134 ... yes 4/135 ... yes 17/136 ... yes 35/137 ... yes 16/138 ... yes 16/139 ... yes 16/140 ... yes 41/141 ... yes 17/142 ... yes 16/143 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.5) Git version >= 2.22.0 ? ... yes (2.24.1) Git user has default SSH configuration? ... no Try fixing it: mkdir ~/gitlab-check-backup-1587644091 sudo mv /var/opt/gitlab/.ssh/id_rsa ~/gitlab-check-backup-1587644091 sudo mv /var/opt/gitlab/.ssh/id_rsa.pub ~/gitlab-check-backup-1587644091 For more information see: doc/ssh/README.md in section "SSH on the GitLab server" Please fix the error above and rerun the checks. Active users: ... 31 Is authorized keys file accessible? ... yes Elasticsearch version 5.6 - 6.x? ... skipped (elasticsearch is disabled)

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Possible fixes

The behavior seems to be good up to release 12.7.9 and changed to bad since 12.8.0 up to the current 12.10.3

Edited by 🤖 GitLab Bot 🤖