Group permissions not respected
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
Tái hiện thiết lập quyền từ issue trong một môi trường được hỗ trợ, bắt đầu với pygit2.Repository và lời gọi init_file_backend được hiển thị tại pygit2/repository.py dòng 1620. Truy vết xem lỗi quyền nhóm xảy ra trong Python binding hay libgit2, sau đó bổ sung kiểm thử hồi quy và ghi lại hành vi hoặc bản sửa lỗi đã được xác nhận.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I ran into a strange behavior when trying to read a bare repo on my FreeBSD machine with pygit2:
Info:
- FreeBSD: 13.1
- libgit2-1.3.2
- pygit2: 1.10.0
> whoami
www
> git init --bare testrepo.git
Initialized empty Git repository in /example/testrepo.git/
> chmod -R 770 testrepo.git
> ls -lah
[...]
drwxrwx--- 7 www www 10B Jul 28 08:48 testrepo.git
> python3 -c "import pygit2;path = pygit2.discover_repository('testrepo.git');print(path);print(pygit2.Repository(path))"
/example/testrepo.git/
pygit2.Repository('/example/testrepo.git/')
> sudo chown -R git:www testrepo.git
> ls -lah
[...]
drwxrwx--- 7 git www 10B Jul 28 08:48 testrepo.git
> python3 -c "import pygit2;path = pygit2.discover_repository('testrepo.git');print(path);print(pygit2.Repository(path))"
/example/testrepo.git/
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/example/.venv/lib/python3.9/site-packages/pygit2/repository.py", line 1620, in __init__
path_backend = init_file_backend(path, flags)
_pygit2.GitError: Repository not found at testrepo.git
> sudo chmod -R 777 testrepo.git
> ls -lah
[...]
drwxrwxrwx 7 git www 10B Jul 28 08:48 testrepo.git
> python3 -c "import pygit2;path = pygit2.discover_repository('testrepo.git');print(path);print(pygit2.Repository(path))"
/example/testrepo.git/
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/example/.venv/lib/python3.9/site-packages/pygit2/repository.py", line 1620, in __init__
path_backend = init_file_backend(path, flags)
_pygit2.GitError: Repository not found at testrepo.git
It seems, like the repo can only be opened if the owner is also the user; the group permissions seem to be ignored.
I could confirm this behavior also on a Ubuntu machine:
- Ubuntu: 20.04
- libgit2-28
- pygit2: 1.10.0
I'm not quite sure if this is a problem of pygit2 or the underlying libgit2, or if I did something wrong…
- Ngôn ngữ chính
- Python
- Star
- 1.7k
- Fork
- 408
- Merge trung bình
- 2 ngày 57 phút
- Pull request đã merge (30 ngày)
- 7
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của libgit2/pygit2
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
Feature Request: Support app-level temporary config overrides using libgit2's backend supprt Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
merge_bases not wrapped Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Tất cả issue của libgit2/pygit2
Issue tương tự
-
essnmx good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
[Feature] 奇物选择添加优先级 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
syfoud/Simulated_Scepter#174 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Giskard-AI/giskard-oss#2840 · 1 bình luận ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Đang mởarea: repo bug perceived difficulty: 2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yeti-platform/yeti#1380 ·