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 -u github.com/golang/protobuf/{proto,protoc-gen-go}" doesn't work. #9

Closed
paulhankin opened this issue Mar 1, 2015 · 3 comments

Comments

@paulhankin
Copy link

The README suggests using "go get -u" to install protobuf. However, it doesn't work.

$ go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
package github.com/golang/protobuf/proto: /Users/paul/Code/go/src/github.com/golang/protobuf is from git@github.com:golang/protobuf, should be from https://github.com/golang/protobuf
package github.com/golang/protobuf/protoc-gen-go: /Users/paul/Code/go/src/github.com/golang/protobuf is from git@github.com:golang/protobuf, should be from https://github.com/golang/protobuf

@dsymonds
Copy link
Contributor

dsymonds commented Mar 1, 2015

It looks like you checked out the repo originally using the native git protocol instead of http. Try deleting $GOPATH/src/github.com/golang/protobuf and trying again. Future updates should stay working.

@paulhankin
Copy link
Author

Deleting src/github.com/golang/protobuf and trying again gave the same error message.

I repro'd in a clean directory too:
cd
mkdir h
cd h
export GOPATH=pwd
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}

package github.com/golang/protobuf/proto
imports github.com/golang/protobuf/protoc-gen-go: /Users/paul/h/src/github.com/golang/protobuf is from git@github.com:golang/protobuf, should be from https://github.com/golang/protobuf

If it helps:
$ go version
go version go1.4 darwin/amd64

@paulhankin
Copy link
Author

Ugh, I found this stanza in my top-level .gitconfig:
[url "git@github.com:"]
insteadOf = https://github.com/

Sorry for the noise.

@golang golang locked as resolved and limited conversation to collaborators Jun 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants