Skip to content

path ownership rights issue leads to invalid bare repo detection #2599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rdstevens-gh opened this issue Apr 7, 2025 · 1 comment · Fixed by #2617
Closed

path ownership rights issue leads to invalid bare repo detection #2599

rdstevens-gh opened this issue Apr 7, 2025 · 1 comment · Fixed by #2617
Labels
bug Something isn't working feature-request good first issue Good for newcomers

Comments

@rdstevens-gh
Copy link

When I run gitui, I get the following error:

invalid path
please run gitui inside of a non-bare git repository

The repository is not bare! git status reports no problems.

Following the docs, I run gitui with logging enabled

gitui -l

The log file contains the following line:

[ERROR] repo open error: repository path [redacted] is not owned by current user; class=Config (7); code=Owner (-36)

This appears to be an error directly from git, which is related to this CVE 2022-24765 (https://nvd.nist.gov/vuln/detail/cve-2022-24765)

The workaround I found was to configure git to treat the directory as safe.

The global approach is:

git config --global --add safe.directory *

This defeats the extra safety checks added by git to address cve-2022-24765.

In my single-user-machine context, I am happy with that risk.

In a true multi-user environment, and more fine-grained approach would be recommended.

@rdstevens-gh rdstevens-gh added the bug Something isn't working label Apr 7, 2025
@extrawurst extrawurst changed the title invalid path please run gitui inside of a non-bare git repository (repository is not bare) path ownership rights issue leads to invalid bare repo detection Apr 7, 2025
@extrawurst
Copy link
Collaborator

What I would like us in gitui to do is to improve the diagnostics, to not falsely error out claiming the repo is bare when in fact in the logs we see that we can detect that its a folder ownership/rights issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature-request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants