jbweston / miniver

Like Versioneer, but smaller
Creative Commons Zero v1.0 Universal
53 stars 10 forks source link

git fails if not owned by user #59

Open klkl0808 opened 1 year ago

klkl0808 commented 1 year ago

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.