Open onew4y opened 1 year ago
Thanks to @onew4y there seems to be a workaround for dvc
... but it's more of a dirty hack than a way to proceed with this.
import pygit2
statement to _init_.py
of dvc
in your python environment OWNER_VALIDATION
option of pygit2 to 0 in the same _init_.py
of dvc
Here's how it can be done when working with conda
:
echo "import pygit2" >> /anaconda/envs/$(ENV_NAME)/lib/python3.8/site-packages/dvc/_init_.py
echo "pygit2.option(pygit2.GIT_OPT_SET_OWNER_VALIDATION, 0)" >> /anaconda/envs/$(ENV_NAME)/lib/python3.8/site-packages/dvc/_init_.py
It is unclear why the global safe.directory setting of git
is not taken into account and has to be set individually as pygit2.option
. We still believe this is a pygit2
issue, not a dvc
issue.
(FYI @efiop)
Related: libgit2/libgit2#6391?
@skshetry seems related to me yes. so therefore the problem lies in libgit2 and not even in pygit2?
@skshetry I just noticed that https://github.com/libgit2/libgit2/pull/6429 was merged in libgit2, which seems to be a duplicate of https://github.com/libgit2/libgit2/issues/6391
@meierale @onew4y, could you please check if this works with pygit2==1.12.0
? Looks like this was fixed in libgit2>=1.6.1
which is used in latest pygit2 release.
@skshetry I have tried pygit2==1.13.1 and confirmed this issue has gone.
We are currently working with dvc for multiple projects and the
dvc exp run
leads to a pygit2 exception on a azure machine learning instance. This leads to problems since folders on mounted drives in azure belong to userroot
whilst the working user isazureuser
The exception looks like following:A workaround for this problem should be setting the git safe.directory to ='*'. But unfortunately this does not work with dvc resp. pygit2.
I narrowed the problem down and was able to reproduce it with pure pygit2. Since it seems to be a pygit2 problem, I am opening the issue directly here. FYI @efiop, @skshetry, @dmpetrov
My git config looks as follows:
With my normal git (
git version 2.36.1
) everything works great with the wildcard*
. But pygit2 seems to ignore this config.But the config seems to be loaded:
Used Versions:
pygit2 1.10.0
Any help would be really appreciated, since we can't run experiments anymore.