Re: Issue 6968 in go: cmd/go: go get git@github.com instead of https://

15 views
Skip to first unread message

g...@googlecode.com

unread,
Dec 16, 2013, 7:02:14 PM12/16/13
to golan...@googlegroups.com
Updates:
Summary: cmd/go: go get g...@github.com instead of https://

Comment #1 on issue 6968 by minux...@gmail.com: cmd/go: go get
g...@github.com instead of https://
http://code.google.com/p/go/issues/detail?id=6968

you can add the following two lines to ~/.gitconfig to work around this
problem:
[url "g...@github.com:"]
insteadOf = https://github.com/

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

g...@googlecode.com

unread,
Dec 16, 2013, 7:14:50 PM12/16/13
to golan...@googlegroups.com

Comment #2 on issue 6968 by l...@webconnex.com: cmd/go: go get
Yeah I have that, but for some reason it isn't working for another
developer working on the same project. To avoid problems in the future I
was hoping that the go get tool could be a little more intelligent in this
regard.

g...@googlecode.com

unread,
Dec 17, 2013, 11:00:47 AM12/17/13
to golan...@googlegroups.com

Comment #3 on issue 6968 by gary.burd: cmd/go: go get g...@github.com
There's an app for fixing the remote:
https://github.com/nf/remotefix/blob/master/main.go

g...@googlecode.com

unread,
Dec 18, 2013, 12:10:48 AM12/18/13
to golan...@googlegroups.com

Comment #4 on issue 6968 by a...@golang.org: cmd/go: go get g...@github.com
Luke: how can we achieve this?

Github doesn't provide any distinction between public and private repos,
except that you can't see the private ones without logging in.

g...@googlecode.com

unread,
Dec 18, 2013, 2:26:59 AM12/18/13
to golan...@googlegroups.com

Comment #5 on issue 6968 by l...@webconnex.com: cmd/go: go get
You could do a HEAD request of the URL. If it comes back as 200 OK it's
public, and if it's 404 it's private. When trying to `go get` a
non-existent repo it creates the directory anyway.

Github also has an REST API that could be used:

http://developer.github.com/v3/repos/#get

Another option is to just have an environmental variable that toggles the
behavior of go get for all github.com repos, regardless if they're public
or private. Downside of that is having to enter your private key password
for public repos, but you only have to do that once every so often.

g...@googlecode.com

unread,
Mar 3, 2014, 3:16:11 PM3/3/14
to golan...@googlegroups.com
Updates:
Status: WorkingAsIntended

Comment #6 on issue 6968 by r...@golang.org: cmd/go: go get g...@github.com
Hmm, private or doesn't exist.

I still think cmd/go is doing the right thing here. It is making tradeoffs
in favor of users of packages, not developers. Developers can run 'git
clone' to get started.

g...@googlecode.com

unread,
Mar 4, 2014, 4:53:42 PM3/4/14
to golan...@googlegroups.com

Comment #7 on issue 6968 by l...@webconnex.com: cmd/go: go get
Isn't cmd/go a developer tool? 'git clone' doesn't download dependencies.
What about adding an -ssh flag? 'go get -ssh github.com/user/package' would
use ssh for the named package and any new dependencies.

g...@googlecode.com

unread,
Aug 7, 2014, 4:53:43 PM8/7/14
to golan...@googlegroups.com

Comment #8 on issue 6968 by s...@ward.io: cmd/go: go get g...@github.com
I have to agree that an -ssh flag sounds great, since 'git clone' doesn't
entirely replace 'go get'.

g...@googlecode.com

unread,
Dec 7, 2014, 11:06:36 PM12/7/14
to golan...@googlegroups.com

Comment #9 on issue 6968 by Justin.R...@gmail.com: cmd/go: go get
g...@github.com instead of https://
https://code.google.com/p/go/issues/detail?id=6968

I agree that this is really awkward. This situation also applies to Github
Enterprise repositories. Having to add a .gitconfig in order to script 'go
get' for an automated build is cumbersome.
Reply all
Reply to author
Forward
0 new messages