Skip to content

gitlab not support go-get with sub-groups

The current gitlab does not support go get with subgroup

https://github.com/gitlabhq/gitlabhq/blob/master/spec/lib/gitlab/middleware/go_spec.rb

https://github.com/gitlabhq/gitlabhq/blob/master/lib/gitlab/middleware/go.rb

We have a package inside a subgroup. Like comnap/graph, the package locate at https://git.example.com/comnap/graph/composite

But run go get

it return error, said the repository comnap/graph.git not exists.

You can test it via curl

curl -v -H 'PRIVATE-TOKEN: -NMsmgr2343242***y' https://git.example.com/comnap/graph/composite\?go-get\=1

see what it return


<html><head><meta name="go-import" content="git.example.com/comnap/graph git https://git.example.com/comnap/graph.git" /></head></html>%