gitui-org / gitui-org/gitui

Snap strict confinement: inaccessible search path for git config

オープン
#2,984 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Rust
スター
22.5k
フォーク
773
PR マージ指標
30日以内にマージされた PR はありません

説明

**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](https://github.com/gitui-org/gitui/blob/9613d153aa713b24ca76db90a382041dab53e5ef/asyncgit/src/sync/mod.rs#L283) 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

```bash
SHELL=/bin/bash
EDITOR=
GIT_EDITOR=
VISUAL=
```

#### Command-line

```bash
/snap/gitui/380/gitui --bugreport
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

asyncgit/src/sync/mod.rs の検索パス処理から始め、特に 283 行付近の参照されているコードを確認し、non-bare リポジトリで snap からインストールした gitui を使って失敗を再現してください。snap の strict confinement が /etc/gitconfig へのアクセスにどのような影響を与えるかを確認してください。報告された権限エラーなしで gitui がメインの TUI 画面を開けば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, linux, rust
領域
cli, operating-systems
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。