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: "go get -u" fails to parse git URL #11457
Comments
@ianlancetaylor: No chance of getting this fixed for Go 1.5? I'm fairly sure it worked in Go 1.4, and has been broken since then. Note that GitHub uses
But this no longer works. |
Oops, GitHub remotes actually look like:
Still, I get the same error. I assume this is the same bug. |
I think this is a regression from 1.4. We should fix it for 1.5 if we can easily do so. |
I have a similar case - the tag includes a RepoRoot starting with ssh://git@git.corp.company.com path, and trying to do
We could work around with Should we change the server sending the meta tags to send |
CL https://golang.org/cl/12226 mentions this issue. |
https://golang.org/cl/12226 fixes the issue. |
@adg: Thanks! I confirm this fixes it for me. Given that this has already regressed once though, is it possible to add a test? |
@jacobsa I thought about it. Hard to do it comprehensively. One straightforward approach would be to test the Doing an integration test is hard because ssh is an unwieldy dependency in tests. In fact, we've stubbed it out for all the go tool's tests. |
No worries, just wanted to make sure you had considered it. Back to the peanut gallery with me. |
@dalu, comments on closed bugs generally are ignored. If you found a new issue, you're probably best off reporting it on a new bug. |
Now that we care about the protocol of Git remotes (for the -insecure flag), we need to recognize and parse the SCP-like remote format. Fixes golang/go#11457 Change-Id: Ia26132274fafb1cbfefe2475f7ac5f17ccd6da40 Reviewed-on: https://go-review.googlesource.com/12226 Reviewed-by: Ian Lance Taylor <iant@golang.org>
CL https://golang.org/cl/23447 mentions this issue. |
This is a fixup change for commit 5cd2944 that added parsing of SCP-like addresses. To get the expected output from (*url.URL).String(), Path needs to be set, not RawPath. Add a test for this, since it has already regressed multiple times. Updates #11457. Change-Id: I806f5abbd3cf65e5bdcef01aab872caa8a5b8891 Reviewed-on: https://go-review.googlesource.com/23447 Run-TryBot: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
With a git remote URL of the form
ssh://git@my.company/package
and a custom import path using HTML<meta>
,go get my.company/package
works, butgo get -u my.company/package
fails with the following error:Changing the URL from
ssh://
togit+ssh://
fixes it. Eitherssh://
should be made to work or a list of supported schemes for each VCS should be documented somewhere.The text was updated successfully, but these errors were encountered: