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
Closed

x/vgo: Private Stash repos not being "found" #25590

jh125486 opened this issue May 26, 2018 · 6 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@jh125486
Copy link

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
Copy link

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
Copy link
Contributor

rsc commented Jun 6, 2018

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

@agnivade agnivade added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jun 7, 2018
@jh125486
Copy link
Author

jh125486 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
Copy link

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

@brunetto
Copy link

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
Copy link
Contributor

rsc 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.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants