git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: William Ruppel <wcruppel@gmail.com>
To: git@vger.kernel.org
Subject: Re: Git "safe directory" not working correctly
Date: Sat, 25 May 2024 16:22:38 -0400	[thread overview]
Message-ID: <CAHa7PX_JwsvADE0Xv9AW--5ZgAChwQTWrqNSGhwWbuabk5_PKQ@mail.gmail.com> (raw)
In-Reply-To: <CAHa7PX8THmTAYFVwAtjimgcenUPC4A5BF2OHExC82Cnrdtbn=g@mail.gmail.com>

FYI, I discovered that the issue appears to be related to the single
quotes. If I do this instead, then all repos are considered safe:

git config --global --add safe.directory *

And in a similar vein, to whitelist just the single repo I was having
an issue with, git itself  says the command should be:

"
To add an exception for this directory, call:
        git config --global --add safe.directory '\\bill\gitmaster\Src'
"

But, again, the single quotes don't allow this to work.

All the examples I've seen use single quotes. Has something regressed
w.r.t. to how single quotes are handled?

Thanks.

On Sat, May 25, 2024 at 2:49 PM William Ruppel <wcruppel@gmail.com> wrote:
>
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
>
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> Upgraded to git 2.25.1.windows.1
> Now when I pull from my remote I get: fatal: detected dubious
> ownership in repository at '\\bill\gitmaster\Src'
> So, I ran this to whitelist everything: git config --global --add
> safe.directory '*'
> However, this does NOT solve the issue! I am still getting the same
> 'dubious ownership' error!
> So... what, is this some sort of bug where UNC paths are not being
> recognized as safe?? Or...?
>
>
> What did you expect to happen? (Expected behavior)
> Pull should succeed without security errors, since I whilelisted *
>
>
> What happened instead? (Actual behavior)
> git craps out with a 'detected dubious ownership' error.
>
>
> What's different between what you expected and what actually happened?
> I cannot pull changes from my remote!
>
>
> Anything else you want to add:
> Please provide a workaround.
>
>
> Please review the rest of the bug report below.
> You can delete any lines you don't wish to share.
>
>
> [System Info]
> git version:
> git version 2.45.1.windows.1
> cpu: x86_64
> built from commit: 965b16798dab6962ada5b0d8cf0dca68f385c448
> sizeof-long: 4
> sizeof-size_t: 8
> shell-path: /bin/sh
> feature: fsmonitor--daemon
> uname: Windows 10.0 19045
> compiler info: gnuc: 13.2
> libc info: no libc information available
> $SHELL (typically, interactive shell): <unset>
>
>
> [Enabled Hooks]
> not run from a git repository - no hooks to show

  reply	other threads:[~2024-05-25 20:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-25 18:49 Git "safe directory" not working correctly William Ruppel
2024-05-25 20:22 ` William Ruppel [this message]
2024-05-25 21:38   ` brian m. carlson
2024-05-25 22:11     ` William Ruppel

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=CAHa7PX_JwsvADE0Xv9AW--5ZgAChwQTWrqNSGhwWbuabk5_PKQ@mail.gmail.com \
    --to=wcruppel@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).