go get
can't fetch repository with several nested groups
#46132
Labels
go get
can't fetch repository with several nested groups
#46132
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Can't test it right now, but probably yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Having several nested groups in gitlab messes with
go mod tidy
(orgo get
)Example: create two nested groups in gitlab, and repository inside it, so url will look like
gitlab.com/group1/group2/repo
Create some module inside it
Try to do
go get gitlab.com/group1/group2/repo
or add this url togo.mod
in another moduleAs far as I know, go mod works with github, where there is only one level of nesting in url, but in gitlab there can be several layers
What did you expect to see?
No errors
What did you see instead?
go: gitlab.com/group1/group2/[email protected]: reading gitlab.com/group1/group2/repo/repo/go.mod at revision repo/v1.0.0: unknown revision repo/v1.0.0
(yes,
repo/repo
is correct)Fix
Somebody actually told me, how to fix it: add this line after
require
(in the end of the file)replace gitlab.ozon.ru/group1/group2/repo => gitlab.ozon.ru/group1/group2/repo.git v1.0.0
The text was updated successfully, but these errors were encountered: