Skip to content
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: error invalid server URL "ssh://git@git.company.com/org/repo": must be HTTPS #24000

Closed
dmitris opened this issue Feb 21, 2018 · 3 comments
Milestone

Comments

@dmitris
Copy link
Contributor

dmitris commented Feb 21, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (vgo version)?

go version go1.10 darwin/amd64 vgo:2018-02-20.1

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (vgo env)?

$ vgo env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/dmitris/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/dmitris/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/d9/6nm5dx2j7vz3hv0kw1m2mdrw0000gp/T/go-build101725784=/tmp/go-build -gno-record-gcc-switches -fno-common"
VGOMODROOT=""

What did you do?

attempt to compile existing package with vgo by adding an empty file go.mod and running vgo install -v

What did you expect to see?

package built without errors

What did you see instead?

An error fetching the code: invalid server URL "ssh://git@git.company.com/go/foobar": must be HTTPS

The package being built - let's call it go.company.com/team/proj [real names changed but consistently] uses an internal package go.company.com/go/foobar. The "normal" go get relies on the redirector proxy (similar to the one on golang.org/x) serving meta tags:

$ curl -s https://go.company.com/go/foobar?go-get=1 | grep meta | grep import
    <meta name="go-import" content="go.company.com/go/foobar git ssh://git@git.company.com/go/foobar">

vgo shows the following error - possibly it does not (yet) know how to handle ssh://git@ (or is it by design?):

vgo: resolving import "go.company.com/go/foobar"
vgo: import "go.company.com/team/proj" ->
	import "go.company.com/go/foobar": invalid server URL "ssh://git@git.company.com/go/foobar": must be HTTPS

I hope that vgo would continue to allow checking out code from ssh://git@git.company.com without having to apply any "hacks" mapping https://git.company.com (useless for us, must use authenticated ssh access to the internal git server) to that "real" git URL.

@gopherbot gopherbot added this to the vgo milestone Feb 21, 2018
@seeruk
Copy link

seeruk commented Feb 21, 2018

Does git@git.company.com:go/foobar work?

@dmitris
Copy link
Contributor Author

dmitris commented Feb 21, 2018

I know it did not work previously with the "normal" go get which is why we had to do this complex ssh://git@git.comany.com redirect. To check if it works currently or with vgo, I would need to change our redirector - I will see if I can set up some local mock.

@rsc
Copy link
Contributor

rsc commented Apr 2, 2018

No, it won't work with alternate ssh syntax. Vgo does not support ssh. We will have to figure out what to do about company servers but that's a bigger issue.

@rsc rsc closed this as completed Apr 2, 2018
@golang golang locked and limited conversation to collaborators Apr 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants