-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/vgo: not working with github enterprise path #25244
Comments
This looks like a dup of #24076, which in theory should be fixed. Are you using the latest |
I installed vgo yesterday. 24076 looks related, but there's no mention of authentication that i noticed in that issue. |
trying the request that i think vgo is making with curl shows that GHE is returning a redirect to the login UI, which is why there are no tags. If there's an easy way to determine the exact request vgo is making that results in the error, i can run that and post relevant info. |
@superfell |
This should be fixed if you update to latest vgo (go get -u golang.org/x/vgo), since vgo is now using the same connection logic as old "go get", and old "go get" now works transparently with the latest GitHub Enterprise release (thanks to GitHub for doing that). |
I see that this is marked as closed, but I've been unable to find an example of the solution. I have private repos that will require API keys in deployment environments and I'm trying to figure out where I tell go.mod "when you see this import, construct this url with this token instead of whatever you would normally do". So in the case of
The end result should be
Can anyone give me an update on the best practice way to accomplish this? Something that doesn't require modifying an existing server would be preferred. |
Trying out vgo with a code base that uses packages hosted on an internal github enterprise server, access to do anything including git clone https:// or download tarballs from tags requires authentication [both companies i've seen using Github Enterprise have it configured this way].
vgo fails to fetch any package from this server, reporting
vgo get github.<corp.com> : unknown module github.<corp.com>/team/package: no go-import tags
There were multiple mentions of enterprise support in the vgo docs, i think this will need to include handling authentication for accessing packages.
What version of Go are you using (
go version
)?go version go1.10.2 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/sfell/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/sfell/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0w/gq6532wd6l955415rv6b_trw395xz4/T/go-build358497285=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
ran vgo build on a file that contains an import path that references an internal github enterprise server.
What did you expect to see?
a correct error about needing authentication, hopefully with instructions on how to provide authentication credentials/tokens etc.
What did you see instead?
vgo get github.<corp.com> : unknown module github.<corp.com>/team/package: no go-import tags
The text was updated successfully, but these errors were encountered: