Snap packages can't use my SSH key

I have installed GitKraken, a git client, through snappy.

$ sudo snap install gitkrakren

But when I try to push to my repository, I get an authentication error. This was weird since I can make the push from the terminal without problems. So I went into the configuration and tried to manually set the public and private key. But when I tried to open the folder ~/.ssh I got a message that it was forbidden.

  • Could it be that GitKraken uses its own SSH keys, since it is a snap package?
  • Is there a way to make it use my own keys or am I forced to use the SSH keys from the snap package?
  • If it is the last case, where can I find them?

It is intentional that by default confined snaps cannot access your ssh keys (or indeed anything in hidden folders/files in your home directory) for good reason. You don't want a random application grabbing your keys and sending them to a remote server.

You can however copy all or some of your keys from ~/.ssh into the home directory the snap sees under ~/snap/gitkraken/current/