Closed Nicolas-Innocent closed 4 months ago
Thanks for reporting!
I believe the error occours when GitButler tries to open a Git repository using git2
, which implements the slightly cursed safe.directory
'directive' that Git introduced a while ago.
This means that once a Git repository isn't owned by the current user (with some added rules on Windows), it won't be opened at all to assure Git doesn't accidentally fall for a 'rigged' repository that is tuned to execute attacker-controlled binaries on the computer that runs Git. Network shares were specifically mentioned as a reason for creating this safeguard.
With that said, you should be able to follow these instructions to allow any repository by specifying its path. Wildcards are also supported, which you could use to see if that works at all - sometimes it can be hard to specify paths correctly so they actually match with what git2
is seeing.
Once GitButler switched to gitoxide
, this won't be an issue anymore as it makes sure to not invoke binaries from untrusted repositories and configuration, while allowing to read everything.
you were indeed correct.
adding the following to my windows c:\users\
[safe]
directory = *
cheers
Version
0.12.5
Operating System
Windows
Distribution Method
msi (Windows)
Describe the issue
Hi, I'm guessing this is due to the fact the code is on a linux VM and my windows machine just connects through samba. works perfectly fine for vs code.
I fully understand if this is not supported as it becomes more complicated to detect file changes on a network drive, but it would at least merit a clearer error message ?
How to reproduce
open a git repo hosted on a network drive.
Expected behavior
either to work (abait with higher latency, or even on manual refresh), or to at least give a better error message (This is not supported on network drives because .....)
Relevant log output