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

[PATCH 0/1] Restore the ability to clone repositories owned by another user

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Nov 15, 2024, 00:54 UTC
Message-ID
<20241115005404.3747302-1-sandals@crustytoothpaste.net>

For a long time, we've told users that the only safe way to operate on an untrusted repository is to clone or fetch from it. We've even mentioned this policy in a variety of places in our documentation.

However, f4aa8c8bb1 ("fetch/clone: detect dubious ownership of local repositories", 2024-04-10), this changed in an attempt to make things more secure. That broke a lot of user use cases, which have been reported to the list.

Because our security model hasn't changed and it's still safe to clone or fetch from an untrusted repository, let's revert a portion of that change to allow us to clone and fetch from repositories owned by a different user. If a malicious repository were a problem for upload-pack, that would probably also be exploitable on major forges, and if it were a problem on the client side, then we'd also have a problem with untrusted HTTPS remotes, so we're not really adding any security risk here.

This matter was discussed extensively in the thread starting at https://lore.kernel.org/git/ZqUc8DJ1uKcHYlcy@imp.flyn.org/.

Note that I haven't signed off on this patch because it's based on one from Junio and I haven't gotten his sign-off yet. It's fine to add mine once he's added his.

brian m. carlson (1):
  Allow cloning from repositories owned by another user
 Documentation/git-clone.txt   |  9 +++++++++
 builtin/upload-pack.c         |  5 ++++-
 daemon.c                      |  6 ++++--
 path.c                        | 10 ++++++----
 path.h                        | 17 ++++++++++++++++-
 t/t0411-clone-from-partial.sh |  3 ---
 t/t5605-clone-local.sh        | 10 ++++++++++
 7 files changed, 49 insertions(+), 11 deletions(-)
Next: brian m. carlson
Message 1 of 8 in “Restore the ability to clone repositories owned by another user”
  1. 0/1 Restore the ability to clone repositories owned by another userbrian m. carlson, Nov 15, 2024
  2. 1/1 Allow cloning from repositories owned by another userbrian m. carlson, Nov 15, 2024
  3. SZEDER GáborMar 31, 2025
  4. brian m. carlsonMar 31, 2025
  5. Junio C HamanoNov 15, 2024
  6. brian m. carlsonNov 15, 2024
  7. Junio C HamanoNov 26, 2024
  8. brian m. carlsonNov 28, 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.