-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: modules do not work with Gitlab.com/Company/Team/Repo Path format #29094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think you have to add a Roping in @myitcv for a deeper look. |
I tried adding a |
https://gitlab.com/antipy/antibuild/api works. maybe see if there is any diferences (or check if you can import that?) |
@Marvalero - please include the output from |
I created This is the output of
|
Also, just in case you had doubts:
And it has many tags (I created them to see if I could fix this import problem):
|
In general it is up to the server to tell the The protocol for other services uses an HTTPS request to resolve the repo root, and is documented here. So in this case the When I do that (using <html><head><meta name="go-import" content="gitlab.com/Beamery/DevOps git https://gitlab.com/Beamery/DevOps.git" /></head></html> If I understand your description correctly, the actual repo location should instead be So it seems that the issue here is in @gitlabhq's server, and you'll need to escalate to them. |
gitlab is not willing to propperly support the protocol for repo privacy reasons, would it be an option to add a hardcoded solution for gitlab with a special indicator indicating the repo(and the rest the path from the root) or something like that? |
Sorry, but “privacy reasons” — without any sort of detail as to what those reasons are — is not a sufficient justification for hard-coding provider details into the We do need some sort of general authentication support for HTTPS fetches, but that's already tracked in #26232. Is there reason to believe that that won't work for GitLab? |
the issue with gitlab is documented here(https://gitlab.com/gitlab-org/gitlab-ce/issues/1337) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was testing if go modules made sense for my company. We want to use it to create private libraries. So I wrote a simple test to check I can import submodules:
Then I try to build the code. I am actually running my code on a container. This is the setup I do:
I think the problem is that the repo name is
server.com/Company/Team/Repo
and go expects to seeserver.com/Company/Repo
. I tried removing the path"gitlab.com/Beamery/DevOps/gotalker"
the app gets built correctlyWhat did you expect to see?
I expect Go Modules to support longer paths like
server.com/Company/Team/Repo
What did you see instead?
I see
build gitlab.com/Beamery/DevOps/maria-modules-test: cannot find module for path gitlab.com/Beamery/DevOps/gotalker
And If I manually add a require for it on go.mod
I see I try to import
server.com/Company/Team/Repo
and it will try to cloneserver.com/Company/Team
and look for the tag versionRepo/v1.0.0
The text was updated successfully, but these errors were encountered: