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

go get failed #29

Closed
zuzuviewer opened this issue Aug 23, 2019 · 16 comments
Closed

go get failed #29

zuzuviewer opened this issue Aug 23, 2019 · 16 comments

Comments

@zuzuviewer
Copy link

parsing go.mod: unexpected module path "github.com/hashicorp/vault-plugin-auth-cf"

@tyrannosaurus-becks
Copy link
Contributor

That's strange, it doesn't fail for me.

$ go get github.com/hashicorp/vault-plugin-auth-cf
go: finding github.com/hashicorp/vault-plugin-auth-cf latest

What go version are you on? I'm on:

$ go version
go version go1.12.7 linux/amd64

@ss25sand
Copy link

ss25sand commented Aug 25, 2019

Failing for me too.

$ go get -u github.com/hashicorp/vault-plugin-auth-pcf
go: finding github.com/hashicorp/vault-plugin-auth-pcf latest
go: github.com/hashicorp/[email protected]: parsing go.mod: unexpected module path "github.com/hashicorp/vault-plugin-auth-cf"
go get: error loading module requirements

Go Version:

$ go version
go version go1.12.7 darwin/amd64

@kalafut
Copy link
Contributor

kalafut commented Aug 25, 2019

Note that that the repo name has changed from "...pcf" to "...cf"

@ss25sand You're trying to go get vault-plugin-auth-pcf, not vault-plugin-auth-cf.

@zuzuviewer Are you perhaps doing the same?

@wouterh-dev
Copy link

Same issue here. Just trying to go get -u an older project which does not mention either vault-plugin-auth-cf or vault-plugin-auth-pcf in its go.mod

@wouterh-dev
Copy link

Looks like vault still references vault-plugin-auth-pcf: https://github.com/hashicorp/vault/blob/master/go.mod#L73

@wouterh-dev
Copy link

And I suppose building all older versions of vault is problematic now due to a broken dependency reference?

@tyrannosaurus-becks
Copy link
Contributor

@wouterhund yes, I have a PR out right now to remove that reference. Also, I'm thinking that it should be possible to build Vault anyways using Vault's vendor directory, and I'm testing if that will work out-of-the-box or if a slight modification will be needed.

hashicorp/vault#7346

@tyrannosaurus-becks
Copy link
Contributor

@wouterhund if you update your call to use cf does it work for you?

@tyrannosaurus-becks
Copy link
Contributor

@zuzuviewer can you provide further steps to reproduce, since we can't reproduce it currently?

  • Your Go version
  • The command you are executing
  • The directory from which you are executing the command

Thanks!

@zuzuviewer
Copy link
Author

@zuzuviewer can you provide further steps to reproduce, since we can't reproduce it currently?

  • Your Go version
  • The command you are executing
  • The directory from which you are executing the command

Thanks!

go version
go version go1.12.9 linux/amd64
cmd
go get -u github.com/micro/protoc-gen-micro
path
¥GOPATH/src

@tyrannosaurus-becks
Copy link
Contributor

tyrannosaurus-becks commented Aug 27, 2019

Thanks! This doesn't appear to be an issue that's addressable in this repository. It looks like there is an identical issue opened in https://github.com/micro/protoc-gen-micro/issues/50. I'm unable to duplicate this issue in that repository either, just linking for posterity.

I don't believe there are any present issues with go getting this repo so am closing this issue for now.

@kalafut
Copy link
Contributor

kalafut commented Aug 28, 2019

I agree that there is nothing more to adjust in this repo.

Some background on what I believe is going on. I'm able to reproduce the go get error provided both my module cache and download cache don't have the dependency.

  1. go get github.com/hashicorp/vault-plugin-auth-pcf is going to attempt to fetch the latest version from the repo. The repo has been renamed "pcf"->"cf", but the download will work because Github will redirect to .../vault-plugin-auth-cf.
  2. The latest rev (1c22058) has a go.mod that references the "cf" repo, so the Go tool complains about it being unexpected, since the go get was for "pcf".
  3. It will work if you go get github.com/hashicorp/vault-plugin-auth-cf
  4. It would also work if you specify a commit before the rename, e.g. go get github.com/hashicorp/vault-plugin-auth-pcf@476d6beb. At this point, the go.mod would have still listed the "pcf" name, so no errors.

Other projects that are referencing the latest version using the "pcf" address will run into this error, and updating to "cf" is the fix.

@zuzuviewer
Copy link
Author

Ok,thank you very much.@kalafut,@tyrannosaurus-becks

@amanhigh
Copy link

Facing same issue. Hope corrected repo name gets merged soon to master.

@kalafut
Copy link
Contributor

kalafut commented Aug 30, 2019

@amanhigh If you're referring to Vault's reference to this repo, that change was merged recently: hashicorp/vault#7346

@amanhigh
Copy link

@kalafut Thanks !! Yes i was referring to Vault's Reference to it. I see its merged but no new Tag has been cut post merge. Hence i guess with go modules "go get -u" is still fetching last tag 1.2.2 which doesn't have the same change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants