Request access to personal-files interface for git-machete

Hi,

In order for git-machete to work it needs to be in classic confinement (it is additional git command)
Let me know if you need more info.
Thanks!

UPDATE:

you don’t need classic to make an additional git command: the icdiff snap for example supplies git icdiff, and is strictly confined.

Yes but git-machete does need to access repository files.

Have you tried making it strict? What errors did you see?

Strict is what we have started with. Here is example:
git machete status
Traceback (most recent call last):
File “/snap/git-machete/x1/bin/git-machete”, line 11, in
load_entry_point(‘git-machete==2.12.9’, ‘console_scripts’, ‘git-machete’)()
File “/snap/git-machete/x1/lib/python3.6/site-packages/git_machete/cmd.py”, line 1978, in main
launch(sys.argv)
File “/snap/git-machete/x1/lib/python3.6/site-packages/git_machete/cmd.py”, line 2066, in launch
definition_file = os.path.join(get_abs_git_dir(), “machete”)
File “/snap/git-machete/x1/lib/python3.6/site-packages/git_machete/cmd.py”, line 489, in get_abs_git_dir
git_dir = popen_git(“rev-parse”, “–git-dir”).strip()
File “/snap/git-machete/x1/lib/python3.6/site-packages/git_machete/cmd.py”, line 156, in popen_git
exit_code, stdout, stderr = popen_cmd(“git”, git_cmd, *args)
File “/snap/git-machete/x1/lib/python3.6/site-packages/git_machete/cmd.py”, line 118, in popen_cmd
process = subprocess.Popen([cmd] + list(args), stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
File “/snap/git-machete/x1/usr/lib/python3.6/subprocess.py”, line 729, in init
restore_signals, start_new_session)
File “/snap/git-machete/x1/usr/lib/python3.6/subprocess.py”, line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘git’: ‘git’

You need to package git in your snap. See how the icdiff snap does it, maybe?

1 Like

Sure I’ll try that asap. Will be back with the result
Thanks!

You were right mate! Thanks a lot for keeping me from doing silly things!
This request can be closed.
Once again thank You!

It looks like some additional actions are required

The Store automatic review failed.
A human will soon review your snap, but if you can’t wait please write in the snapcraft forum asking for the manual review explicitly.
If you need to disable confinement, please consider using devmode, but note that devmode revision will only be allowed to be released in edge and beta channels.
Please check the errors and some hints below:

  • override not found for ‘plugs/gitconfig’. Use of the personal-files interface is reserved for vetted publishers. If your snap legitimately requires this access, please make a request in the forum using the ‘store-requests’ category (https://forum.snapcraft.io/c/store-requests), or if you would prefer to keep this private, the ‘sensitive’ category.
  • human review required due to ‘allow-installation’ constraint (bool)

Shall I create new topic?

just edit the topic name to reflect the new request :wink:

1 Like

Looking at the snapcraft.yaml, it has:

plugs:
  gitconfig:
    interface: personal-files
    read:
    - $HOME/.gitconfig
    - $HOME/.config/git/config

+1 for use of personal-files with auto-connect for read-only access as per the referenced snapcraft.yaml, above and with the gitconfig interface reference (which is what other git-using snaps use).

@reviewers - can others vote on this?

1 Like

Hey, any updates on this topic?

+1 from me too for use of and auto-connect of personal-files as gitconfig per the snapcraft.yaml

1 Like