git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Regression bug with latest SAFE ownership patch

From
James <purpleidea@gmail.com>
Date
Aug 17, 2024, 03:15 UTC
Message-ID
<CADCaTgpcmMbLoKR-rWf_roWfbgWJL6HuURDxwovvKQA8syf=vw@mail.gmail.com>
I am not a subscriber to this mailing list, so please please CC-me on replies.

I believe the recent changes for the safe ownership patch seemed to have introduced a regression. I have a git repo which is on a shared server that I trust and control. Adding a safe.directory does _not_ allow me to use this repo anymore. I can't even run a `git fetch` without an error. I have renamed the repo name and directory, but output is otherwise precise. Full logs and versions shown below:

james@computer1:~/whatever$ git remote show server2 fatal: detected dubious ownership in repository at '/home/someoneelse/whatever/.git' To add an exception for this directory, call:

    git config --global --add safe.directory /home/someoneelse/whatever/.git
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. james@computer1:~/whatever$ git config --add safe.directory /home/someoneelse/whatever/.git james@computer1:~/whatever$ git config --add safe.directory '*' james@computer1:~/whatever$ git fetch server2 fatal: detected dubious ownership in repository at '/home/someoneelse/whatever/.git' To add an exception for this directory, call:

    git config --global --add safe.directory /home/someoneelse/whatever/.git
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
james@computer1:~/whatever$ cat .git/config
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[branch "master"]
    remote = origin
    merge = refs/heads/master
[remote "server2"]
    url = ssh://root@server2:/home/someoneelse/whatever/
    fetch = +refs/heads/*:refs/remotes/server2/*
[safe]
    directory = /home/someoneelse/whatever/.git
    directory = *
james@computer1:~/whatever$ git version
git version 2.45.2
james@computer1:~/whatever$ ssh root@server2 git version
git version 2.45.2
james@computer1:~/whatever$

Thanks, James @purpleidea https://purpleidea.com/ https://github.com/purpleidea/mgmt/

Next: brian m. carlson
Message 1 of 3 in “Regression bug with latest SAFE ownership patch”
  1. JamesAug 17, 2024
  2. brian m. carlsonAug 17, 2024
  3. Colin StagnerAug 18, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.