-
Notifications
You must be signed in to change notification settings - Fork 1k
Support for ProjectRoot to be on 3rd level after domain? #1396
Comments
I ran into the same issue. |
hi folks - i appreciate the detailed writeup and thoughtful response, but unfortunately, this is a gitlab problem - see #1355 (comment) . it seems they've merged a fix, but i don't know if it's available in a released version yet. |
I don't think it is gitlab problem
Here is related testcase in dep - https://github.com/golang/dep/blob/master/manifest_test.go#L604 If i change name in constraint like this (removing "team")
everything is ok @sdboyer Looks like it is still an issues? |
I created a feature proposal at gitlab a few days ago. I know, that currently gitlab won't return the correct go-get meta information, when you're not authorized, e.g. your targeted repo is private and wants your credentials. Everything should be pretty good explained in that proposal about this exact case. And if this applies to you, feel free to help implement it ;) But if this doesn't apply to you (e.g. your repo is public), then you have to dig further, mainly you have to check, if the recieved go-get meta information is correct. As far as I understand dep is using, or behaving same as, |
In our case |
Having the same issue here. I have a private project on third level and ran into the issue with go get at first. Once I configured git to use ssh by running
Did I miss anything or is this an issue in dep? |
+1 |
The problem I am seeing in these comments is that your gitlab project has a subgroup and Dep does not recognize that. The reason is that a subgroup, in this case "repo", is private. This is based on Gitlab's security policy that subgroups are always private and changing that is not supported.
To get the above to work, in your Gopkg.tml all you need to do is add ".git" to the end of the url like this: [[constraint]] That URL above with .git would be the same for the import in your Go file. This a known issue with gitlab. At least that is what the developers of Dep say. |
Uh oh!
There was an error while loading. Please reload this page.
What version of
dep
are you using (dep version
)?v0.3.2-83-g13df556
What
dep
command did you run?Trying to use init:
Trying to use directly ensure by providing the following Gopkg.toml:
What did you expect to see?
That the package name company.io/organisation/team/library is detected as ProjectRoot. But instead, it tried to load Package company.io/organisation/team.git and probably assumed library as internal package, but that's not the case.
What did you see instead?
Error that my dependency is not valid.
Some notes
We're using gitlab, where you can have (indefinitly?) subgroups, so this way you can have a domain.io/group/subgroup/repo structure (or deeper). Is this 2 level path for ProjectRoot enforced by dep or golang?
And if yes, why is it enforced? Because, so far I can follow:
Directory structure for context:
And in service/main.go the import is:
The text was updated successfully, but these errors were encountered: