Skip to content

Snap strict confinement: inaccessible search path for git config #2984

Description

@non-descriptive

Describe the bug
Running gitui installed from snap attempts to access file '/etc/gitconfig which is not accessible in snap context. For proper handling its probably would require configuring additional search paths, similar to this commentary.

To Reproduce

  1. Install gitui from snap snap install gitui
  2. Create non-bare repository
mkdir -p ./test-repo
cd ./test-repo
git init
 git rev-parse --is-bare-repository # should yield false

or open any existing non-bare repo.
3. run gitui from snap snap run gitui and see error

Error: invalid repo path: failed open - '/etc/gitconfig' is locked: Permission denied; class=Os (2); code=Locked (-14)

Expected behavior
gitui would open main TUI screen

Additional Context

snap run gitui --bugreport

Software version

gitui 0.28.1 (v0.19.0-1066-ge24fb45d-modified)

Operating system

  • OS: Linux (Ubuntu Core 24)
  • Kernel: 6.1.0-37-amd64

Compile time information

  • Profile: release
  • Target triple: x86_64-unknown-linux-gnu
  • Family: unix
  • OS: linux
  • Architecture: x86_64
  • Pointer width: 64
  • Endian: little
  • CPU features: crt-static,fxsr,sse,sse2
  • Host: x86_64-unknown-linux-gnu

Environment variables

SHELL=/bin/bash
EDITOR=<not set>
GIT_EDITOR=<not set>
VISUAL=<not set>

Command-line

/snap/gitui/380/gitui --bugreport

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions