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' fails at google/go-github/v30/github #11

Closed
MatthewCroughan opened this issue Jul 7, 2020 · 6 comments · Fixed by #12
Closed

'go get' fails at google/go-github/v30/github #11

MatthewCroughan opened this issue Jul 7, 2020 · 6 comments · Fixed by #12

Comments

@MatthewCroughan
Copy link
Contributor

matthew@thinkpad ~/git $ go get -u github.com/rhysd/notes-cli
package github.com/google/go-github/v30/github: cannot find package "github.com/google/go-github/v30/github" in any of:
	/usr/lib/go/src/github.com/google/go-github/v30/github (from $GOROOT)
	/home/matthew/go/src/github.com/google/go-github/v30/github (from $GOPATH)

Unsure if this is to do with my gopath, etc.

@MatthewCroughan
Copy link
Contributor Author

here's a verbose output:

matthew@thinkpad ~/git $ go get -u -v github.com/rhysd/notes-cli
github.com/rhysd/notes-cli (download)
github.com/blang/semver (download)
github.com/fatih/color (download)
github.com/kballard/go-shellquote (download)
github.com/mattn/go-colorable (download)
github.com/mattn/go-isatty (download)
get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at //golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
golang.org/x/sys (download)
get "golang.org/x/sys/internal/unsafeheader": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at //golang.org/x/sys/internal/unsafeheader?go-get=1
get "golang.org/x/sys/internal/unsafeheader": verifying non-authoritative meta tag
github.com/mattn/go-runewidth (download)
github.com/pkg/errors (download)
github.com/rhysd/go-github-selfupdate (download)
github.com/google/go-github (download)
package github.com/google/go-github/v30/github: cannot find package "github.com/google/go-github/v30/github" in any of:
	/usr/lib/go/src/github.com/google/go-github/v30/github (from $GOROOT)
	/home/matthew/go/src/github.com/google/go-github/v30/github (from $GOPATH)
github.com/inconshreveable/go-update (download)
github.com/tcnksm/go-gitconfig (download)
github.com/ulikunitz/xz (download)
get "golang.org/x/oauth2": found meta tag get.metaImport{Prefix:"golang.org/x/oauth2", VCS:"git", RepoRoot:"https://go.googlesource.com/oauth2"} at //golang.org/x/oauth2?go-get=1
golang.org/x/oauth2 (download)
get "golang.org/x/oauth2/internal": found meta tag get.metaImport{Prefix:"golang.org/x/oauth2", VCS:"git", RepoRoot:"https://go.googlesource.com/oauth2"} at //golang.org/x/oauth2/internal?go-get=1
get "golang.org/x/oauth2/internal": verifying non-authoritative meta tag
get "golang.org/x/net/context/ctxhttp": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at //golang.org/x/net/context/ctxhttp?go-get=1
get "golang.org/x/net/context/ctxhttp": verifying non-authoritative meta tag
golang.org/x/net (download)
get "gopkg.in/alecthomas/kingpin.v2": found meta tag get.metaImport{Prefix:"gopkg.in/alecthomas/kingpin.v2", VCS:"git", RepoRoot:"https://gopkg.in/alecthomas/kingpin.v2"} at //gopkg.in/alecthomas/kingpin.v2?go-get=1
gopkg.in/alecthomas/kingpin.v2 (download)
github.com/alecthomas/template (download)
github.com/alecthomas/units (download)

@MatthewCroughan
Copy link
Contributor Author

https://github.com/google/go-github/tree/master/github exists, but v30 does not exist any more. Maybe you're now supposed to use the master?

@MatthewCroughan MatthewCroughan changed the title Cannot simply install 'go get' instructions. 'go get' fails at google/go-github/v30/github Jul 7, 2020
@MatthewCroughan
Copy link
Contributor Author

I've made an issue here, assuming this is a genuine problem with upstream and would be interested to figure out why it is not, if it is not. google/go-github#1570

@MatthewCroughan
Copy link
Contributor Author

MatthewCroughan commented Jul 7, 2020

The CI shows the same failure here.
https://travis-ci.org/github/rhysd/notes-cli/jobs/673803098

Comments from a user in IRC indicate that this is a misunderstanding of "modules mode"

GO111MODULE=on go get -u github.com/rhysd/notes-cli/cmd/notes for example works fine on my system.

@MatthewCroughan
Copy link
Contributor Author

go env -w GO111MODULE=on will set module mode on for users. This should be included in the README to make sure that people can successfully install via go get.

@MatthewCroughan
Copy link
Contributor Author

This is due to golang/go#30515

MatthewCroughan added a commit to MatthewCroughan/notes-cli that referenced this issue Jul 7, 2020
@rhysd rhysd closed this as completed in #12 Jul 7, 2020
rhysd added a commit that referenced this issue Jul 7, 2020
Tell users to enable module mode in go env #11
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

Successfully merging a pull request may close this issue.

1 participant