-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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 package@branch fails after upgrading to 1.13 #34175
Comments
Thank you for reporting this issue @jgimeno! Could you please give more detail and perhaps a minimal reproduction for issue? That will help make it actionable and easy for folks to diagnose what's going wrong. Thank you. |
/cc @bcmills @jayconrod |
Hi! I haven't time to isolate it in some dummy project from scratch. But the idea is this one. With version 1.12 in a project I could add a dependency on an external project that still was not merged in a branch lets say "theBranch". So in the main project I could do go get github.com/therepo@theBranch, but if I do it in version 1.13 it fails with that error "invalid: disallowed version string". I dont know if making it in a new project, empty with another project as the "branch" project would work, but in my case this is what happened. Now I have returned to 1.12 and I could go get the dependency by branch. |
I've hit the same issue. For me it happens when having slashes in the branch name like |
Workaround: use the commit hash instead of the branch name. You can use |
The case @cryptix encountered seems like a duplicate of #32955. The workaround @dolmen suggested may work. I can't say @jgimeno's case is identical without the exact branch name or the full error message now. But I am guessing that's similar. If the module version in the branch is not meant to be publicly available yet, how about bypassing Go module mirror and the global checksum db by specifying in GOPRIVATE. https://golang.org/doc/go1.13#modules ? |
I don't think is the same issue, at least not directly. That issue has this information on the go.mod. Mine is simpler, if I do That go get, if is interesting to note generates a line in go.mod that looks like this (did not mention anything about @feature-branch name).
|
@jgimeno Thanks. Do you mind sharing the exact version string that caused the problem (was it literally "feature-branch"? And, also can you try go1.13 with |
About the GOPROXY=direct I will test soon today. |
Duplicate of #32955 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
This happened to me since updating to 1.13.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go get package@branch
What did you expect to see?
I would like to pull the branch dependency.
What did you see instead?
invalid: disallowed version string
The text was updated successfully, but these errors were encountered: