jbweston / miniver

Like Versioneer, but smaller

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

git fails if not owned by user

klkl0808 opened this issue · comments

In recent versions of git, the command fails if the .git directory is not owned by the user executing the git command. This is the result of a security patch CVE-2022-24765.

Others have seen this problem, too, for example setuptools-scm. Their fix is to specify --git-dir explicitly. This would be straightforward in miniver, but the module _version.py does not know where the .git directory lives (it is commonly located in the parent directory of the python root package, but this is not guaranteed). So I don't have an immediate suggestion for a foolproof fix.