Run Git from stricted snap service

I created snap service for app which runs Git. Git installed to snap via stage-package. I installed service with strict confinement. When my service tries run Git (Golang app via exec.Command), Git returns error: Permission denied fatal: Could not read from remote repository.

This error appears only with strict confinement.

Service has network plug.

How can I solve this problem?

install the snappy-debug snap and run it in a terminal … then in a second terminal restart your service and you should see some hints about potential plugs to add …

1 Like

Thank you very mach! I added required plug (ssh-keys) and now it works.

1 Like