File ownership · gitpython-developers/GitPython · Discussion #1900
In case anyone is as puzzled as I was, this appears to be a version of this question, along with the fix.
GitPython isn't mentioned, but it would certainly run into the same problem when running git under the hood, and what's proposed here is a fix.