You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ mkdir fresh && cd fresh # outside $GOPATH
$ set -x -g GO111MODULE on
$ go mod init fresh
$ go get -v -x "google.golang.org/grpc"
What did you expect to see?
• If user was authenticated to pull from cloud.google.com:
The requested module to be downloaded and defined in go.mod. No problem.
• If user was not authenticated to pull from cloud.google.com:
This go get output needs to convey an actionable error reason for the user to fix the situation. Something like:
$ go get "google.golang.org/grpc"
go: finding cloud.google.com/go v0.26.0
go: google.golang.org/grpc@v1.19.1 ->
cloud.google.com/go@v0.26.0: fatal: remote error:
Invalid authentication credentials.
Please generate a new identifier:
https://code.googlesource.com/new-password
What did you see instead?
This go get output does not convey any actionable error reason for the user to fix the situation.
$ go get "google.golang.org/grpc"
go: finding cloud.google.com/go v0.26.0
go: google.golang.org/grpc@v1.19.1 ->
cloud.google.com/go@v0.26.0: unknown revision v0.26.0
I had to dig deeper with go get -v -x to find the command that failed. Thanks @thepudds and @heschik.
Then I had to manually execute the failing command (git ls-remote -q ...) to find the actual/useful failure reason.
go get -v -x "google.golang.org/grpc" Output
$ go get -v -x "google.golang.org/grpc"
Fetching https://google.golang.org/grpc?go-get=1
Parsing meta tags from https://google.golang.org/grpc?go-get=1 (status code 200)
get "google.golang.org/grpc": found meta tag get.metaImport{Prefix:"google.golang.org/grpc", VCS:"git", RepoRoot:"https://github.com/grpc/grpc-go"} at https://google.golang.org/grpc?go-get=1
mkdir -p /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs # git2 https://github.com/grpc/grpc-go
# lock /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs/53ab5f2f034ba42de32f909aa45670cf730847987f38664c4052b329152ad727.lock# /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs/53ab5f2f034ba42de32f909aa45670cf730847987f38664c4052b329152ad727 for git2 https://github.com/grpc/grpc-go
cd /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs/53ab5f2f034ba42de32f909aa45670cf730847987f38664c4052b329152ad727; git ls-remote -q https://github.com/grpc/grpc-go
6.443s # cd /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs/53ab5f2f034ba42de32f909aa45670cf730847987f38664c4052b329152ad727; git ls-remote -q https://github.com/grpc/grpc-go
Fetching https://cloud.google.com/go?go-get=1
Parsing meta tags from https://cloud.google.com/go?go-get=1 (status code 200)
get "cloud.google.com/go": found meta tag get.metaImport{Prefix:"cloud.google.com/go", VCS:"git", RepoRoot:"https://code.googlesource.com/gocloud"} at https://cloud.google.com/go?go-get=1
mkdir -p /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs # git2 https://code.googlesource.com/gocloud
# lock /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs/b0e27935eb83c1d7843713bafab507e95768b550f0552cb42d9f41e5fd9c8375.lock# /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs/b0e27935eb83c1d7843713bafab507e95768b550f0552cb42d9f41e5fd9c8375 for git2 https://code.googlesource.com/gocloud
go: finding cloud.google.com/go v0.26.0
cd /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs/b0e27935eb83c1d7843713bafab507e95768b550f0552cb42d9f41e5fd9c8375; git tag -l
0.011s # cd /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs/b0e27935eb83c1d7843713bafab507e95768b550f0552cb42d9f41e5fd9c8375; git tag -l
cd /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs/b0e27935eb83c1d7843713bafab507e95768b550f0552cb42d9f41e5fd9c8375; git ls-remote -q https://code.googlesource.com/gocloud
1.439s # cd /Users/Gurpartap/Projects/go/pkg/mod/cache/vcs/b0e27935eb83c1d7843713bafab507e95768b550f0552cb42d9f41e5fd9c8375; git ls-remote -q https://code.googlesource.com/gocloud
go: google.golang.org/grpc@v1.19.1 ->
cloud.google.com/go@v0.26.0: unknown revision v0.26.0
$ git ls-remote -q https://code.googlesource.com/gocloud
fatal: remote error:
Invalid authentication credentials.
Please generate a new identifier:
https://code.googlesource.com/new-password
The text was updated successfully, but these errors were encountered:
gopherbot
removed
the
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
label
Oct 10, 2019
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
• If user was authenticated to pull from cloud.google.com:
The requested module to be downloaded and defined in go.mod. No problem.
• If user was not authenticated to pull from cloud.google.com:
This
go get
output needs to convey an actionable error reason for the user to fix the situation. Something like:What did you see instead?
This
go get
output does not convey any actionable error reason for the user to fix the situation.I had to dig deeper with
go get -v -x
to find the command that failed. Thanks @thepudds and @heschik.Then I had to manually execute the failing command (
git ls-remote -q ...
) to find the actual/useful failure reason.go get -v -x "google.golang.org/grpc"
OutputThe text was updated successfully, but these errors were encountered: