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: Private Stash repos not being "found" #25590

Closed
jh125486 opened this issue May 26, 2018 · 6 comments

Comments

@jh125486
Copy link

commented May 26, 2018

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

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

Does this issue reproduce with the latest release?

Possibly? I'm just using go get -u golang.org/x/vgo currently.

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

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\jh125486\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:/Users/jh125486/go
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config

What did you do?

vgo build

I have a rewrite rule in my ~/.gitconfig which works for go get:

[url "ssh://git@stash.XYZ.com/"]
        insteadOf = https://stash.XYZ.com/scm/

What did you expect to see?

A generated go.mod replicating the dependencies from Gopkg.toml.

What did you see instead?

vgo: import "stash.XYZ.com/blargh/ABC" ->
        import "stash.XYZ.com/blargh/service_now": file not found

I also hit #25110, but this happens after removing the Gopkg.lock.

@gopherbot gopherbot added this to the vgo milestone May 26, 2018

@kobenauf

This comment has been minimized.

Copy link

commented May 27, 2018

It's a bit different than your situation, but posting this here in case anyone else runs into it. I had an import from a private github repo. vgo build failed:
fatal: could not read Username for 'https://github.com': No error
I was on git 2.13.3. Updating to the newest version, git 2.17.0 fixed this. Now when I run vgo build a dialog box opens asking for username/password for the private repo.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2018

Please try with the latest vgo. Please also post your Gopkg.lock once you get it back.

@jh125486

This comment has been minimized.

Copy link
Author

commented Jun 8, 2018

Is there a better way to update vgo then doing go get -u golang.org/x/vgo
That's just returning:

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

which is the same version I had before (ie, do I need to switch branches or tags and do a checkout).

This is my git version if it matters:

$ git version
git version 2.9.0.windows.1
@gopherbot

This comment has been minimized.

Copy link

commented Jun 20, 2018

Change https://golang.org/cl/120042 mentions this issue: cmd/go/internal/modfetch: fix Lookup, Import; add ImportRepoRev

@brunetto

This comment has been minimized.

Copy link

commented Jun 26, 2018

Hi, with

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

running vgo get on a private Github repo I get repository not found. The same happens trying to vgo build a project using the private repo.

The repo exists, I can clone it, access it and I have it locally on my system in $GOPATH.

Maybe I'm missing something?

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2018

This should be fixed as of a few minutes ago - vgo now uses basically the same code as "go get" to resolve repos. If you are still having problems, please open a new issue and mention this one in the report. (Both to shorten the comment sequence and because most people don't have permission to reopen this issue anyway.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
6 participants
You can’t perform that action at this time.