Skip to content

cmd/go: 'Access is denied' when renaming module cache directory #36568

@kiwionly

Description

@kiwionly

What version of Go are you using (go version)?

13.6

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

Window 10, intel

go env Output
$ go env

What did you do?

I had a mod file which is 1.13

When I run go build, it download the dependency, however, it end with error like this. e.g.

cannot load golang.org/x/net/html: rename C:\Users\502380\go\pkg\mod\golang.org\x\[email protected] C:\Users\502380\go\pkg\mod\golang.org\x\[email protected]:

What did you expect to see?

build should successful without any error.

What did you see instead?

#This is running in jetbrain goland

go: extracting golang.org/x/net v0.0.0-20190620200207-3b0461eec859
build command-line-arguments: cannot load golang.org/x/net/html: rename C:\Users\502380\go\pkg\mod\golang.org\x\[email protected] C:\Users\502380\go\pkg\mod\golang.org\x\[email protected]: Access is denied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions