I am using git version 2.35.2.windows.1 on my win10.
My project is stored in my NAS running Ubuntu.
I set up an SMB remote disk using samba, and do all necessary work on win10.
After the 2.35 update, i got
fatal: unsafe repository ('//192.168.1.120/sambashare/x' is owned by someone else) To add an exception for this directory, call:
git config --global --add safe.directory //192.168.1.120/sambashare/x
And after i did as instructed, git threw a warning said:
warning: encountered old-style '//192.168.1.120/sambashare/x' that should be '%(prefix)//192.168.1.120/x'
I tried to tweak the directory string a little (like changing it to Z://x, Z://192.168.1.120/x, etc.), but that is of no avail.
my git config file looks like:
[safe] directory = //192.168.1.120/sambashare/x , and i am not quite sure what to do to fix this problem.
For now, i am doing all my git work via ssh. Thx in advance for any potential solution.
/. Literally like this: %(prefix)/.Run net use to list the exact remote paths of mounted shares.
If the network share was mounted as \\123.123.123.123\repoA run
git config --global --add safe.directory %(prefix)///123.123.123.123/repoA
If the network share was mounted as \\servername\repoB run
git config --global --add safe.directory %(prefix)///servername/repoB
If the network share was mounted as \\servername.company.com\repoC run
git config --global --add safe.directory %(prefix)///servername.company.com/repoC
Alternatively you can edit the config with git config --global --edit to the following
[safe]
directory = %(prefix)///123.123.123.123/repoA
directory = %(prefix)///servername/repoB
directory = %(prefix)///servername.company.com/repoC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With