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
cmd/go: private Github repos still require -f to update #10791
Comments
Well, I don't see any issue here. I tried the commands you mentioned and it seems to work fine for me. I also tried with private repo of my own with no issue at all. I think the reason why you are facing problem is perhaps because you did |
I can reproduce this using the godep repo in a clean workspace: $ go version
go version go1.4.2 darwin/amd64
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ mkdir gosrc
$ export GOPATH=`pwd`/gosrc
$ go get -u github.com/tools/godep
$ ls gosrc/bin/
godep
$ go get -u github.com/tools/godep
package github.com/tools/godep: github.com/tools/godep is a custom import path for https://github.com/tools/godep, but /Users/codemonkey/Projects/gosrc/src/github.com/tools/godep is checked out from git@github.com:tools/godep |
I see, you are using the buggy code. The fix (https://go-review.googlesource.com/#/c/3504/) for parent issue (#9697) was merged on Feb20. While go1.4.2 was released on Feb18. It seems go1.4.2 does not include the fix. I tried with master branch - |
I see; we're unlikely to introduce the development version into our build. Is there a plan for a 1.4.3 release? |
I am not sure about that, maybe someone from core contributors can comment about it. |
There are no current plans for a 1.4.3 release. If there were, it's quite unlikely that this would be included. In minor releases we only fix critical bugs with no workarounds. This bug has a workaround: use -f. Do I understand correctly that this bug is fixed on tip? |
Yes, it is fixed on tip. |
As a workaround, if you rename the remote from "origin" to something else, it starts working shrug. So, given the example in the description, this seems to fix it:
|
As reported in #9697, the pre-1.4 way to work with private repositories was to add configuration to ask Git to rewrite the URLs being generated by
go get
:The initial fix for this issue in 668762c works fine for initially checking out a repository, but the fix is incomplete.
go get
continues to fail when updating a repository:$ go get -u github.com/tools/godep $ go get -u github.com/tools/godep package github.com/tools/godep: github.com/tools/godep is a custom import path for https://github.com/tools/godep, but /Users/codemonkey/Projects/gopath/src/github.com/tools/godep is checked out from git@github.com:tools/godep
The workaround for this is to specify
-f
togo get
; as was noted in the prior ticket, updating scripting to specify this flag everywhere is possible but irritating.The text was updated successfully, but these errors were encountered: