devpod icon indicating copy to clipboard operation
devpod copied to clipboard

Permission denied to access SSH config while opening workspace

Open jomo02 opened this issue 2 years ago • 1 comments

What happened?
When opening a newly created workspace, the process gets stuck when trying to access my SSH config file.

What did you expect to happen instead?
No problems while modifying my SSH config file.

How can we reproduce the bug? (as minimally and precisely as possible)
Create workspace from any quickstart example on a M3 with Docker, Docker Credential Helper and Colima installed through HomeBrew and open it.

Local Environment:

  • DevPod Version: 0.4.2
  • Operating System: mac
  • ARCH of the OS: ARM64

DevPod Provider:

  • Local provider: docker

Debug Log

[15:38:54] debug Done creating devcontainer
[15:38:54] fatal open /Users/jomo02/.ssh/config: permission denied
write ssh config
github.com/loft-sh/devpod/pkg/ssh.writeSSHConfig
        /Users/runner/work/devpod/devpod/pkg/ssh/config.go:136
github.com/loft-sh/devpod/pkg/ssh.configureSSHConfigSameFile
        /Users/runner/work/devpod/devpod/pkg/ssh/config.go:46
github.com/loft-sh/devpod/pkg/ssh.ConfigureSSHConfig
        /Users/runner/work/devpod/devpod/pkg/ssh/config.go:25
github.com/loft-sh/devpod/cmd.configureSSH
        /Users/runner/work/devpod/devpod/cmd/up.go:631
github.com/loft-sh/devpod/cmd.(*UpCmd).Run
        /Users/runner/work/devpod/devpod/cmd/up.go:170
github.com/loft-sh/devpod/cmd.NewUpCmd.func1
        /Users/runner/work/devpod/devpod/cmd/up.go:115
github.com/spf13/cobra.(*Command).execute
        /Users/runner/work/devpod/devpod/vendor/github.com/spf13/cobra/command.go:916
github.com/spf13/cobra.(*Command).ExecuteC
        /Users/runner/work/devpod/devpod/vendor/github.com/spf13/cobra/command.go:1044
github.com/spf13/cobra.(*Command).Execute
        /Users/runner/work/devpod/devpod/vendor/github.com/spf13/cobra/command.go:968
github.com/loft-sh/devpod/cmd.Execute
        /Users/runner/work/devpod/devpod/cmd/root.go:90
main.main
        /Users/runner/work/devpod/devpod/main.go:8
runtime.main
        /Users/runner/hostedtoolcache/go/1.20.5/x64/src/runtime/proc.go:250
runtime.goexit
        /Users/runner/hostedtoolcache/go/1.20.5/x64/src/runtime/asm_arm64.s:1172

jomo02 avatar Jan 09 '24 14:01 jomo02

Solved it by myself: The config was owned by root. After changing it to jomo02 it worked.

jomo02 avatar Jan 09 '24 15:01 jomo02