question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Go sample `permission denied` issues with dependencies

See original GitHub issue

Description

There are issues with current Go devfile sample https://github.com/eclipse/che-devfile-registry/tree/master/devfiles/go. This is the sample project: https://github.com/golang/example. We have tasks just for its outyet part, which works ok. However, there are many other Go files with main functions. Problematic ones are those with 3rd party dependencies, like this one https://github.com/golang/example/blob/master/gotypes/skeleton/main.go. When theia tries to build the file, it fails with permission denied to /go directory, when it try to download dependency there. go_permissiondenied

Reproduction Steps

There is another issue with clone path #13796 which affects also this devfile. This patch has to be applied to the devfile. Without that, project is cloned to ... golang/example/example. Once the issue is fixed, this patch must not be needed.

diff --git a/devfiles/go/devfile.yaml b/devfiles/go/devfile.yaml
index 8c09ff9..508a8c7 100644
--- a/devfiles/go/devfile.yaml
+++ b/devfiles/go/devfile.yaml
@@ -8,7 +8,7 @@ projects:
   source: 
     type: git
     location: https://github.com/golang/example.git
-  clonePath: src/github.com/golang/example/
+  clonePath: src/github.com/golang/
 components:
 -
   type: chePlugin

OS and version:
7.0.0-rc-4.0-SNAPSHOT

Diagnostics: running go: Current GOPATH task say /go:/projects is the current GOPATH. I believe this is the issue. GOPATH set in the plugin here https://github.com/eclipse/che-plugin-registry/blob/master/v3/plugins/ms-vscode/go/0.11.0/meta.yaml#L20 have /go as first and this is where it tries to download the dependency, but has no permissions there.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:25 (25 by maintainers)

github_iconTop GitHub Comments

1reaction
sparkoocommented, Jul 23, 2019

yes, works now. thanks.

0reactions
tolushacommented, Jul 25, 2019

@amisevsk correct. The fix was for sidecar image.

Read more comments on GitHub >

github_iconTop Results From Across the Web

`go get` fails with permission denied on certain go packages
3rd party dependency), use go get -d <pkg> instead. Example: ... to a directory that you own, and thus no permission: denied error...
Read more >
Go Dependency "Access is denied" on Windows Builds - Reddit
Sometimes I get "Access is denied" errors during the "extracting" phase of installing dependencies.
Read more >
go.mod: permission denied : GO-8249 - YouTrack - JetBrains
Retain the old dependency information, and/or; allow the user to reload dependencies after the permission issue has been fixed. What happens instead? All ......
Read more >
Native Access Error Message: "Permission denied"
Symptom Upon launching Native Access, you receive the following error ... To access it, click 'Go' in the Finder menu bar and hold...
Read more >
Container permission denied: How to diagnose this error
Use the --privileged flag to ensure it is a security problem. Sometimes the problem is related to something other than security, such as ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found