"go list -m -json all" results in permission denied

GoLand 2018.2.3

Build #GO-182.4505.32, built on September 20, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.1


Something in GoLand keeps automatically running this process:

GOROOT=/usr/local/Cellar/go/1.11.2/libexec #gosetup
GOPATH=/Users/user/go #gosetup
/usr/local/Cellar/go/1.11.2/libexec/bin/go list -m -json all #gosetup

And the command constantly fails with:

go: open /Users/user/go/pkg/mod/gopkg.in/yaml.v2@v2.2.1/go.mod: permission denied

Even though said file is completely readable

$ ls -la  /Users/user/go/pkg/mod/gopkg.in/yaml.v2@v2.2.1/go.mod
-r--r--r--  1 user  staff  95 Nov  7 12:41 /Users/user/go/pkg/mod/gopkg.in/yaml.v2@v2.2.1/go.mod

How do I fix this or switch this behavior off?

It's driving me nuts because it pops up every minute or so


Hi Noam,

It doesn't look like the problem of GoLand. Have you tried to run the very same command in terminal (with GO111MODULE=on)?


Thanks, Alexander.

It runs successfully.

Two things aren't clear here:

  1. What process is running this? It might not be an issue with GoLand but GoLand constantly runs this command
  2. Where is this process running? It's not clear what the pwd is

1. GoLand runs it, for sure. And this what it should do if you want to work with Go modules project

2. In the root of your module


Great, so how do we tackle this?


Could you show the output of the exact command (including setting env variables) in the terminal?


Uploaded the files to youtrack. Let's continue there


Any progress on this? Suffering from exact same issue...

Very annoying indeed.


Frederic, I cannot recreate the issue. You're welcome to provide diagnostics information here: https://youtrack.jetbrains.com/issue/GO-6392



Jetbrains Support!   Please help with this, experiencing this issue all the time, how do we get rid of these errors on the bottom of my IDE?



Please sign in to leave a comment.