git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: Andrew Noblet <andrewbnoblet@gmail.com>, git@vger.kernel.org
Subject: Re: safe directory on shared drives
Date: Fri, 15 Apr 2022 12:43:26 +0100	[thread overview]
Message-ID: <3a02bf6c-54c1-39c8-5f3e-9f246c9e87b8@iee.email> (raw)
In-Reply-To: <CAO=QCg5+M-=dOf=AFTDL8z9-LrK-7vau+=JV-7QJfVOhdFp1Aw@mail.gmail.com>

Hi Andrew,

On 15/04/2022 11:14, Andrew Noblet wrote:
> The new git security rules creates an issue on Windows systems where
> the git repository is hosted in a shared folder.
>
> $ git status
>
> ```
> fatal: unsafe repository ('//192.168.0.120/config/' is owned by someone else)
> To add an exception for this directory, call:
>
>         git config --global --add safe.directory //192.168.0.120/config/
> ```
>
> $ git config --global --add safe.directory //192.168.0.120/config/
> $ git status
>
> ```
> warning: encountered old-style '//192.168.0.120/config/' that should
> be '%(prefix)//192.168.0.120/config/'
> fatal: unsafe repository ('//192.168.0.120/config/' is owned by someone else)
> To add an exception for this directory, call:
>
>         git config --global --add safe.directory //192.168.0.120/config/
> ```
>
> There seems to be no way to add a shared drive path to the safe directory list.

This (instruction clarification) is being discussed / sorted at
[git-for-windows/git] Include trailing slash in prefix migration
instructions (PR #3790)
https://github.com/git-for-windows/git/pull/3790

The key point being that for a `//server` path you will need three
slashes. (IIUC) One for magic prefix string, and then two as part of the
server name.

There is now also the `*` option that permits all as safe directories. 
Worth checking how the user and group security is being handled locally,
especially for accidental failures.
Philip



  reply	other threads:[~2022-04-15 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-15 10:14 safe directory on shared drives Andrew Noblet
2022-04-15 11:43 ` Philip Oakley [this message]
     [not found]   ` <CAO=QCg6+J-dA2U9F5dseKbb=HA_pLFmZ9tbHydnLRSk5Dg2UXg@mail.gmail.com>
2022-04-15 12:02     ` Philip Oakley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a02bf6c-54c1-39c8-5f3e-9f246c9e87b8@iee.email \
    --to=philipoakley@iee.email \
    --cc=andrewbnoblet@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).