Unknown revision for gitlab dependency
已完成
Hi all,
I have a problem in GoLand (2020.1.3). I have a project that refers to another project in our Gitlab repo and GoLand doesn't seem to be able to resolve it - I get the following error:
go: gitlab.company.network/xxx/yyy-core.git@v0.0.44: reading gitlab.company.network/xxx/yyy-core.git/go.mod at revision v0.0.44: unknown revision v0.0.44
If I build on the command line everything works, although in my git configuration I have a URL substitution as follows: "url.git@gitlab.company.network.insteadof=https://gitlab.company.network". I suspect this may be relevant to the problem. Is there some equivalent configuration I need to do in GoLand?
Thanks in advance :)
请先登录再写评论。
Hello,
Most often this error is due to the fact that the correct value of the variable GOPRIVATE is not set.
Please check the set variables, in particular GOPRIVATE. A better way to point the pattern to your organization on Gitlab, for example,
gitlab.com/jetbrains/*
. Do it from GoLand (File | Settings | Go | Go Modules | Environment
).Does it help?
Thanks for the help. It turned out that my insteadOf line was slightly wrong - should have been:
"url.ssh://git@gitlab.company.network.insteadof=https://gitlab.company.network" (added ssh://)
I have the same error, but after I set in ~/.gitconfig
And I added the env `GOPRIVATE=gitlab.company.com`, it works..