Skip to content

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

@rdstevens-gh

Description

@rdstevens-gh

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.

Metadata

Metadata

Assignees

No one assigned

    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