Broken links for git submodules
Created by: bflorea
Summary
I have upgraded from Gitlab 6.7 by upgrading first to the latest 6.* version using the upgrade script and then following the manual upgrade guide for upgrading to 7.6. Now, the links for all git submodules hosted by the same Gitlab instalation are broken. The links for the modules hosted externally work fine. This bug appeared after the upgrade.
Steps to reproduce
Create a git repository (I'll call it R1) and another one inside of it (I'll call it R2). Create some files in R2, commit and push the changes to the server. Add R2 as a submodule of R1 (for me, R2 was located in a folder called "packages/od:pagination")
git submodule add [email protected]:meteor-packages/pagination.git packages/od\:pagination
Add all the files from R1, commit and push changes to the server.
Expected behavior
When viewing the files from the repository R1 in gitlab and clicking the link to a submodule hosted on the same server, I would expect to get to that submodule.
Observed behavior
The links to the submodules hosted on the same server are broken
Screenshots
Checks
git@zeus:~/gitlab$ bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
Checking Environment ...
Git configured for git user? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 2.4.0 ? ... OK (2.4.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
Satellites access is drwxr-x---? ... yes
hooks directories in repos are links: ...
2/1 ... ok
3/2 ... ok
4/3 ... ok
2/4 ... ok
5/5 ... ok
3/6 ... ok
2/7 ... ok
2/8 ... ok
2/9 ... ok
2/10 ... ok
2/11 ... ok
2/12 ... ok
2/13 ... ok
6/14 ... ok
2/15 ... ok
2/16 ... ok
2/17 ... ok
2/18 ... ok
2/19 ... ok
2/20 ... ok
2/21 ... ok
2/22 ... ok
3/23 ... ok
3/24 ... ok
2/25 ... ok
2/26 ... ok
6/27 ... ok
2/28 ... ok
2/29 ... ok
2/30 ... ok
6/31 ... ok
6/32 ... ok
2/33 ... ok
5/34 ... ok
3/35 ... ok
4/36 ... ok
3/37 ... ok
6/38 ... ok
3/39 ... ok
2/40 ... ok
9/41 ... ok
8/42 ... ok
5/43 ... ok
10/44 ... ok
11/45 ... repository is empty
4/46 ... ok
4/47 ... ok
4/48 ... ok
3/49 ... ok
5/50 ... ok
13/51 ... ok
13/52 ... ok
13/53 ... ok
3/54 ... ok
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/home/git/repositories: OK
/home/git/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.4
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ...
2/1 ... yes
3/2 ... yes
4/3 ... yes
2/4 ... yes
5/5 ... yes
3/6 ... yes
2/7 ... yes
2/8 ... yes
2/9 ... yes
2/10 ... yes
2/11 ... yes
2/12 ... yes
2/13 ... yes
6/14 ... yes
2/15 ... yes
2/16 ... yes
2/17 ... yes
2/18 ... yes
2/19 ... yes
2/20 ... yes
2/21 ... yes
2/22 ... yes
3/23 ... yes
3/24 ... yes
2/25 ... yes
2/26 ... yes
6/27 ... yes
2/28 ... yes
2/29 ... yes
2/30 ... yes
6/31 ... yes
6/32 ... yes
2/33 ... yes
5/34 ... yes
3/35 ... yes
4/36 ... yes
3/37 ... yes
6/38 ... yes
3/39 ... yes
2/40 ... yes
9/41 ... yes
8/42 ... yes
5/43 ... yes
10/44 ... yes
11/45 ... yes
4/46 ... yes
4/47 ... yes
4/48 ... yes
3/49 ... yes
5/50 ... yes
13/51 ... yes
13/52 ... yes
13/53 ... yes
3/54 ... yes
Projects have satellites? ...
2/1 ... yes
3/2 ... yes
4/3 ... yes
2/4 ... yes
5/5 ... yes
3/6 ... yes
2/7 ... yes
2/8 ... yes
2/9 ... yes
2/10 ... yes
2/11 ... yes
2/12 ... yes
2/13 ... yes
6/14 ... yes
2/15 ... yes
2/16 ... yes
2/17 ... yes
2/18 ... yes
2/19 ... yes
2/20 ... yes
2/21 ... yes
2/22 ... yes
3/23 ... yes
3/24 ... yes
2/25 ... yes
2/26 ... yes
6/27 ... yes
2/28 ... yes
2/29 ... yes
2/30 ... yes
6/31 ... yes
6/32 ... yes
2/33 ... yes
5/34 ... yes
3/35 ... yes
4/36 ... yes
3/37 ... yes
6/38 ... yes
3/39 ... yes
2/40 ... yes
9/41 ... yes
8/42 ... yes
5/43 ... yes
10/44 ... yes
11/45 ... can't create, repository is empty
4/46 ... yes
4/47 ... yes
4/48 ... yes
3/49 ... yes
5/50 ... yes
13/51 ... yes
13/52 ... yes
13/53 ... yes
3/54 ... yes
Redis version >= 2.0.0? ... yes
Ruby version >= 2.0.0 ? ... yes (2.1.3)
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.9.1)
Checking GitLab ... Finished
Version
GitLab 7.6.2 43180c62
Setup
git@zeus:~/gitlab$ bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System: Ubuntu 14.04
Current User: git
Using RVM: yes
RVM Version: 1.26.7
Ruby Version: 2.1.3p242
Gem Version: 2.2.2
Bundler Version:1.7.3
Rake Version: 10.3.2
Sidekiq Version:2.17.8
GitLab information
Version: 7.6.2
Revision: 43180c6
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://localhost
HTTP Clone URL: http://localhost/some-project.git
SSH Clone URL: git@localhost:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 2.4.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/gitgit@zeus:~/gitlab$ bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System: Ubuntu 14.04
Current User: git
Using RVM: yes
RVM Version: 1.26.7
Ruby Version: 2.1.3p242
Gem Version: 2.2.2
Bundler Version:1.7.3
Rake Version: 10.3.2
Sidekiq Version:2.17.8
GitLab information
Version: 7.6.2
Revision: 43180c6
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://localhost
HTTP Clone URL: http://localhost/some-project.git
SSH Clone URL: git@localhost:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 2.4.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git