Is it possible to make use of pygit2 or GitPython packages to reference git repositories from within databricks?

tompile
New Contributor III

I am making use of repos in databricks and am trying to reference the current git branch from within the notebook session.

For example:

from pygit2 import Repository

repo = Repository('/Workspace/Repos/user@domain/repository')

The code above throws an error stating that the repository cannot be found. Similar errors are thrown with GitPython as well. It seems to me that DataBricks Repos are configured in a way that means these packages cannot recognise them.

Does anyone have any experience of this?

Thanks