-
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 mod vendor: open C:\Users\LICENSE: Access is denied. #46867
Comments
Thank you for raising this issue. Unfortunately you haven't provided any information on how someone else can reproduce the problem you are experiencing. Can you please include a way that someone else can reproduce the problem you are seeing. IMPORTANT: Please do not include screenshots of text, just copy and paste the text directly |
My login user to my computer has no permission to create any file under the C:\Users directory. |
It looks like you have a copy of k8s.io/kubernetes checked out in $HOME/go/src/k8s.io/kubernetes. Is that correct? If you can provide a set of commands that gets a windows machine with Go installed to the point of the command that failed; ie, git clone (or however you did it), cd $directory, go mod vendor. That would be of great assistance. |
C:\Users shouldn't be your project's directory. |
go/src/cmd/go/internal/modcmd/vendor.go Line 302 in 666315b
This should be: pkg = path.Dir(pkg) Since pkg is a paths separated with slash (not backslash). I'll send CL. |
Change https://golang.org/cl/330149 mentions this issue: |
So you mean this is a bug and will be fixed in a future release? |
|
which shell / environment (WSL?) are you using? |
I can reproduce this failure mode locally using the stock
|
Change https://golang.org/cl/332250 mentions this issue: |
@gopherbot, please backport. This bug has a trivial fix, and the failure mode is fairly confusing with no obvious workaround. |
Backport issue(s) opened: #47014 (for 1.15), #47015 (for 1.16). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/332329 mentions this issue: |
Change https://golang.org/cl/332330 mentions this issue: |
For #46867 Change-Id: I1547ebf7b91e9ddd7b67fd2f20e91391d79fa35d Reviewed-on: https://go-review.googlesource.com/c/go/+/332250 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
…for package paths in 'go mod vendor' copyMetadata walk-up to parent directory until the pkg become modPath. But pkg should be slash-separated paths. It have to use path.Dir instead of filepath.Dir. Updates #46867 Fixes #47015 Change-Id: I44cf1429fe52379a7415b94cc30ae3275cc430e8 Reviewed-on: https://go-review.googlesource.com/c/go/+/330149 Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Bryan C. Mills <bcmills@google.com> Trust: Alexander Rakoczy <alex@golang.org> Trust: Carlos Amedee <carlos@golang.org> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> (cherry picked from commit 835d86a) Reviewed-on: https://go-review.googlesource.com/c/go/+/332329 Reviewed-by: Jay Conrod <jayconrod@google.com>
…for package paths in 'go mod vendor' copyMetadata walk-up to parent directory until the pkg become modPath. But pkg should be slash-separated paths. It have to use path.Dir instead of filepath.Dir. Updates #46867 Fixes #47014 Change-Id: I44cf1429fe52379a7415b94cc30ae3275cc430e8 Reviewed-on: https://go-review.googlesource.com/c/go/+/330149 Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Bryan C. Mills <bcmills@google.com> Trust: Alexander Rakoczy <alex@golang.org> Trust: Carlos Amedee <carlos@golang.org> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> (cherry picked from commit 835d86a) Reviewed-on: https://go-review.googlesource.com/c/go/+/332330 Reviewed-by: Jay Conrod <jayconrod@google.com> Run-TryBot: Carlos Amedee <carlos@golang.org>
$ go mod vendor |
@helloxjade What version of Go do you use? |
my go version is go1.16 windows/amd64
At 2022-04-12 17:33:58, "mattn" ***@***.***> wrote:
@helloxjade What version of Go do you use?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@helloxjade, this issue was fixed in Go 1.17, which is currently the oldest supported Go release (per https://go.dev/doc/devel/release#policy). It was also backported to Go 1.16.7, although that release is no longer supported. Upgrading to a supported release should solve your issue. |
ok,thank you . I have a try
At 2022-04-12 21:44:21, "Bryan C. Mills" ***@***.***> wrote:
@helloxjade, this issue was fixed in Go 1.17, which is currently the oldest supported Go release. Upgrading to a supported release should solve your issue.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go mod vendor
What did you expect to see?
go mod works well
What did you see instead?
go mod vendor: open C:\Users\LICENSE: Access is denied.
The text was updated successfully, but these errors were encountered: