* safe directory on shared drives
@ 2022-04-15 10:14 Andrew Noblet
2022-04-15 11:43 ` Philip Oakley
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Noblet @ 2022-04-15 10:14 UTC (permalink / raw)
To: git
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: safe directory on shared drives
2022-04-15 10:14 safe directory on shared drives Andrew Noblet
@ 2022-04-15 11:43 ` Philip Oakley
[not found] ` <CAO=QCg6+J-dA2U9F5dseKbb=HA_pLFmZ9tbHydnLRSk5Dg2UXg@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Philip Oakley @ 2022-04-15 11:43 UTC (permalink / raw)
To: Andrew Noblet, git
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: safe directory on shared drives
[not found] ` <CAO=QCg6+J-dA2U9F5dseKbb=HA_pLFmZ9tbHydnLRSk5Dg2UXg@mail.gmail.com>
@ 2022-04-15 12:02 ` Philip Oakley
0 siblings, 0 replies; 3+ messages in thread
From: Philip Oakley @ 2022-04-15 12:02 UTC (permalink / raw)
To: Andrew Noblet, Git List
Glad it worked!
copying in the list in case others can be helped by the confirmation.
P.
On 15/04/2022 12:55, Andrew Noblet wrote:
> Thank you! Adding `git config --global --add safe.directory
> '%(prefix)///192.168.0.120/config/'` <http://192.168.0.120/config/'`>
> worked!
>
> Andrew
>
> On Fri, Apr 15, 2022 at 7:43 AM Philip Oakley <philipoakley@iee.email>
> wrote:
>
> 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/
> <http://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/ <http://192.168.0.120/config/>
> > ```
> >
> > $ git config --global --add safe.directory
> //192.168.0.120/config/ <http://192.168.0.120/config/>
> > $ git status
> >
> > ```
> > warning: encountered old-style '//192.168.0.120/config/
> <http://192.168.0.120/config/>' that should
> > be '%(prefix)//192.168.0.120/config/ <http://192.168.0.120/config/>'
> > fatal: unsafe repository ('//192.168.0.120/config/
> <http://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/ <http://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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-15 12:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 10:14 safe directory on shared drives Andrew Noblet
2022-04-15 11:43 ` Philip Oakley
[not found] ` <CAO=QCg6+J-dA2U9F5dseKbb=HA_pLFmZ9tbHydnLRSk5Dg2UXg@mail.gmail.com>
2022-04-15 12:02 ` Philip Oakley
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).