-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: document lookup process for qualified module paths #41267
Comments
This looks like 2 separate errors
go currently does not consider names without dots as hosts, as of #37641 these are considered reserved names for the stdlib
remote imports need to follow https://golang.org/cmd/go/#hdr-Remote_import_paths |
I added
and it gives a different message:
My ~/.gitconfig has this
When |
@dwschulze Could you run with The |
your git config also needs to rewrite the git protocol to ssh |
I removed the
The docs really need to cover this and explain why having the |
I'd like to guide this issue to some resolution. I don't think we really know what went wrong. Having the This doesn't seem related to whether the host contains a non-routable address or not. We don't allow module paths that don't have a dot in the first path element (see Module paths and versions, but local names and IP addresses are fine. Finding a repository for a module path describes the process. That section doesn't cover qualified module paths, so it should definitely be updated. When the module path ends with a VCS qualifier like |
Change https://golang.org/cl/276354 mentions this issue: |
For golang/go#33637 Fixes golang/go#41267 Change-Id: Ic7928c05ef200b574afc15acdbabdc6ab2d5e30d Reviewed-on: https://go-review.googlesource.com/c/website/+/276354 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
What version of Go are you using (
go version
)?go version go1.15.1 linux/amd64
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 have a git repo on a computer on my network (hostname ubuntu-18-extssd, IP 192.168.0.12):
Inside of the repo is a package stringpackage.
The go get command fails:
So I try with the IP address:
I add the following to ~/.gitconfig:
I get the same error.
I've tried multiple ways of setting GOPRIVATE
export GOPRIVATE=192.168.0.12/gitrepo/*
export GOPRIVATE=ubuntu-18-extssd
but get the same error.
You need to actually try this on a local computer with a non-routeable IP address. I've tried the same thing on github.com and it works. The
go get
command only wants to work on public, routeable IP addresses.Many companies keep their source code internally on hosts with non-routable IP addresses, and this prevents sharing code and makes using modules impossible.
The text was updated successfully, but these errors were encountered: