Go get fails with the usage of subgroups
Steps to reproduce
Go get seems not able to fetch the correct path when using subgroups:
$ go get -v xxx.local/a/b/project
Fetching https://xxx.local/a/b/project?go-get=1
Parsing meta tags from https://xxx.local/a/b/project?go-get=1 (status code 200)
get "xxx.local/a/b/project": found meta tag main.metaImport{Prefix:"xxx.local/a/b", VCS:"git", RepoRoot:"https://xxx.local/a/b.git"} at https://xxx.local/a/b/project?go-get=1
get "xxx.local/a/b/project": verifying non-authoritative meta tag
Fetching https://xxx.local/a/b?go-get=1
Parsing meta tags from https://xxx.local/a/b?go-get=1 (status code 200)
xxx.local/a/b (download)
package xxx.local/a/b/project: /home/user/go/src/xxx.local/a/b exists but /home/user/go/src/xxx.local/a/b/.git does not - stale checkout?
The issue here is that the RepoRoot
is wrong, because it points to https://xxx.local/a/b.git
instead of https://xxx.local/a/b/project.git
.
What works actually without any error is:
$ go get -v xxx.local/a/b/project.git
What is the current bug behavior?
The repo is not go get-able.
What is the expected correct behavior?
It should work with and without the .git
extension.
Results of GitLab environment info
System information
System: Ubuntu 16.04
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.10.2
Sidekiq Version:4.2.7
GitLab information
Version: 9.0.5-ee
Revision: 71d72c9
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
DB Version: 9.6.1
URL: https://xxx.local
HTTP Clone URL: https://xxx.local/some-group/some-project.git
SSH Clone URL: git@xxx.local:some-group/some-project.git
Elasticsearch: no
Geo: no
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 5.0.0
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
Edited by 🤖 GitLab Bot 🤖