-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: non-root modules not fetched from a repository hosted on GitHub Enterprise 2.16.12 #36991
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
The protocol that the So, what is the output of If the server implements the protocol correctly, it should be something like:
|
According to https://enterprise.github.com/releases, the current GHE release is 2.19.6. Does this issue reproduce with that version of the server? |
(Note that per https://enterprise.github.com/releases/series/2.16, “GitHub Enterprise Server 2.16 [is] deprecated as of January 22, 2020[.]”) |
Thanks @bcmills, the output for checking the subdirectory is nothing, only the root repo responds with a
I don't know what the current release response is -- I'll look into upgrading our server. |
Argh, I typo'd the command. Should be |
Same output:
|
Still seems buggy to me. If only the exact import path is allowed, why does it bother checking all the parent paths? Public github also doesn't respond to subpath imports
...but the import works fine. I realize there may be hardcoded exceptions, but it seems to me that if a git repo responds at the root then |
In contrast, other subcommands (such as So it is important that |
Public GitHub is (unfortunately) hard-coded, so any bugs in its implementation of the |
I've tested this on GHE 2.19.3 and it works as expected, with the subdirectories returning a proper |
Great! Closing this issue, since the |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, and with go1.14beta1.
What operating system and processor architecture are you using (
go env
)?go env
OutputThe GHE server version is 2.16.12
What did you do?
I created a test repository on the company's internal Github Enterprise (GHE) that had a module that was not at the root of the repo. I was unable to import the module from elsewhere using
go get
:Then elsewhere I tried:
(or with tags of the format:
packages/lib/v1.0.0
)go get
OutputWorkaround
It works if I name the module with
repo.git
instead ofrepo
as:And elsewhere I can do:
or I can use tags of the format:
packages/lib/v1.2.3
However, this only works if the
go.mod
file itself names the module with the.git
suffix.This is in contrast to importing a module at the root which works fine with or without the
.git
suffix.(related #17898)
The text was updated successfully, but these errors were encountered: