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

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

From
Jeff King <peff@peff.net>
Date
Apr 10, 2025, 22:42 UTC
Message-ID
<20250410224223.GA3191424@coredump.intra.peff.net>
In-Reply-To
<Z_hCjfoRUIDZoBfP@tapette.crustytoothpaste.net>
On Thu, Apr 10, 2025 at 10:13:33PM +0000, brian m. carlson wrote:
Show 14 quoted lines
> On 2025-04-10 at 21:35:42, Jeff King wrote:
> > 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.

Yeah, that's true in v2.48.0 and later. (I tried it after writing the earlier email and was a little puzzled that it works with --no-local but not otherwise, but it sounds like that's known).

-Peff
Previous: brian m. carlsonNext: brian m. carlson
Message 4 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.