threads / discuss / 65086

git clone --bundle-uri: follow redirects?

Subject: git clone --bundle-uri: follow redirects?

## tl;dr

One message between Feb 27, 2026 and Feb 27, 2026.

replies: 0people: 1as markdown or json

Xavier Morel· Feb 27, 2026, 12:04 UTC · lore

As I was playing with --bundle-uri again, I found a new oddity: git doesn't seem to follow redirects when resolving the URI, and the error feedback is less than ideal.

One of the few projects which seem to publicly use and advertise bundles (or at least one of the few that's easy to find) is the kernel, they have a pages recommending either using a custom script[0] or fetching the bundle locally then cloning it[1] -- the latter in order to resume the bundle download on poor connections. I figured I could just

     git clone 
--bundle-uri=https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/clone.bundle 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
however that immediately prints
     warning: failed to download bundle from URI 
'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/clone.bundle'
     warning: failed to fetch objects from bundle URI 
'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/clone.bundle'
 From what I understand, this is because the bundle-uri above is a 
permanent redirect to 
https://mirrors.edge.kernel.org/pub/scm/.bundles/pub/scm/linux/kernel/git/torvalds/linux/clone.bundle, 
and while wget will follow redirects by default that is not the case of 
curl. Thus git finds itself with essentially no content, and definitely 
not bundle content.

[0]: https://www.kernel.org/best-way-to-do-linux-clones-for-your-ci.html [1]: https://www.kernel.org/cloning-linux-from-a-bundle.html

← back to recent threads