6

I'm trying to open an Apache project repository from GitKraken but I am getting error with permissions because I can't access the /var folder.

GitKraken permission error

My folder has this route: var/www/html/Catalogo. Inside the folder named 'Catalogo' I have my Git repository.

I found this Stack Overflow post having my same problem but the error was not solved: link to Stack Overflow post. There is an comment suggesting to make a post here, but I can't find that post.

Any help is appreciated.

[EDIT]

I also show the output ot snap list command

snap list output

3
  • How did you install GitKraken? – N0rbert Jul 31 '18 at 19:38
  • 1
    From the Ubuntu Software Center. – DanielJaramillo Jul 31 '18 at 19:54
  • As I may see it is not deb-packaged. Please add output of snap list to the question. – N0rbert Jul 31 '18 at 19:58
5

The reason for the described behaviour is that snap applications are installed by default with confined permissions. This is a deliberate choice and you can read more on the subject here:

https://tutorials.ubuntu.com/tutorial/advanced-snap-usage#3
4. Handling interfaces and permissions in your snaps

The plugin removable-media seems to be declared in: https://github.com/mmtrt/gitkraken/blob/master/snap/snapcraft.yaml

The snap connect for this plugin did not work for me either. (I am unsure the above was the correct git repository for this snap, as the author mentions not maintaining it any longer as it now released by Axosoft.)

Thus leaves you with few options:
(1) actively do something to make it work by contributing to the code (if possible)
(2) trust the application and install it with "devmode" permissions
(3) wait utill snap connect gitkraken:removable-media starts working

In case you wish to proceed with option (2) and install the application with devmode permissions (you should know that you grant access to the app to anything your user would have access to):

sudo snap remove gitkraken
sudo snap install --devmode gitkraken

to verify if the installation happened as intended you can check for "devmode" by running the command "snap list" (see how this are supposed to have changed, you may have more snaps listed here, I have included only the one you should check)

snap list

Name               Version        Rev   Tracking  Publisher         Notes
gitkraken          4.1.1          134   stable    gitkraken✓        -

targeted outcome

Name               Version        Rev   Tracking  Publisher         Notes
gitkraken          4.1.1          134   stable    gitkraken✓        devmode

Cheers, Happy Coding!

1
  • Welcome to Ask Ubuntu! :-) Excellent first answer! Keep up the good work! +1 to your answer means +10 to your rep! – Fabby Dec 15 '18 at 16:41
1

It seems that GitKraken Snap do not have access to internal storage, but it has access to home folder.

Connecting removable-media with snap connect gitkraken:removable-media does not help.

Consider one of the following:

  • move your repository to home folder.
  • remove GitKraken with snap remove gitkraken and install version from official site.

For other similar issues see this answer.

0

I have found a working solution for this issue on the snapcraft.io forum.

You can mount your var/www/html/Catalogo directory to a new folder inside your home directory, and you can open that from Gitkraken.

mkdir $HOME/www/Catalogo
sudo mount -obind /var/www/html/Catalogo $HOME/www/Catalogo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.