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

Re: 'safe.directory' setting ignored for some operations?

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 10, 2025, 22:13 UTC
Message-ID
<Z_hCjfoRUIDZoBfP@tapette.crustytoothpaste.net>
In-Reply-To
<20250410213542.GA3168175@coredump.intra.peff.net>
On 2025-04-10 at 21:35:42, Jeff King wrote:
Show 9 quoted lines
> So I think things are working as intended. You can get around it with
> either of these:
> 
>   - set the config in your user ~/.gitconfig, which will be read by the
>     child upload-pack command
> 
>   - tell clone to pass the config to upload-pack, like:
> 
>      git clone -u 'git -c safe.directory="*" upload-pack' ...

I think you can also use `git clone --no-local` in a more recent version and the normal clone-from-untrusted-repository semantics will kick in and things will work.

-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Previous: Jeff KingNext: Jeff King
Message 3 of 6 in “'safe.directory' setting ignored for some operations?”
  1. Nikolaus RathApr 10, 2025
  2. Jeff KingApr 10, 2025
  3. brian m. carlsonApr 10, 2025
  4. Jeff KingApr 10, 2025
  5. brian m. carlsonApr 11, 2025
  6. Nikolaus RathApr 11, 2025

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.