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

Re: With big repos and slower connections, git clone can be hard to work with

From
Eellie <el@horse64.org>
Date
Jun 8, 2024, 00:46 UTC
Message-ID
<200c3bd2-6aa9-4bb2-8eda-881bb62cd064@horse64.org>
In-Reply-To
<0beb01dab93b$c01dfa10$4059ee30$@nexbridge.com>

The deepening worked perfectly, thank you so much! I hope a resume will still be considered however, if even just to help out newcomers.

Regards,
Ellie
On 6/8/24 2:35 AM, rsbecker@nexbridge.com wrote:
Show 70 quoted lines
> On Friday, June 7, 2024 8:03 PM, ellie wrote:
>> Subject: Re: With big repos and slower connections, git clone can be hard to work
>> with
>>
>> Thanks, this is very helpful as an emergency workaround!
>>
>> Nevertheless, I usually want the entire history, especially since I wouldn't mind
>> waiting half an hour. But without resume, I've encountered it regularly that it just
>> won't complete even if I give it the time, while way longer downloads in the
>> browser would. The key problem here seems to be the lack of any resume.
>>
>> I hope this helps to understand why I made the suggestion.
>>
>> Regards,
>>
>> Ellie
>>
>> On 6/8/24 1:33 AM, rsbecker@nexbridge.com wrote:
>>> On Friday, June 7, 2024 7:28 PM, ellie wrote:
>>>> I'm terribly sorry if this is the wrong place, but I'd like to
>>>> suggest a potential issue with "git clone".
>>>>
>>>> The problem is that any sort of interruption or connection issue, no
>>>> matter how brief, causes the clone to stop and leave nothing behind:
>>>>
>>>> $ git clone https://github.com/Nheko-Reborn/nheko
>>>> Cloning into 'nheko'...
>>>> remote: Enumerating objects: 43991, done.
>>>> remote: Counting objects: 100% (6535/6535), done.
>>>> remote: Compressing objects: 100% (1449/1449), done.
>>>> error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly:
>>>> CANCEL (err 8)
>>>> error: 2771 bytes of body are still expected
>>>> fetch-pack: unexpected disconnect while reading sideband packet
>>>> fatal: early EOF
>>>> fatal: fetch-pack: invalid index-pack output $ cd nheko
>>>> bash: cd: nheko: No such file or director
>>>>
>>>> In my experience, this can be really impactful with 1. big repositories and 2.
>>>> unreliable internet - which I would argue isn't unheard of! E.g.
>>>> a developer may work via mobile connection on a business trip. The
>>>> result can even be that a repository is uncloneable for some users!
>>>>
>>>> This has left me in the absurd situation where I was able to download
>>>> a tarball via HTTPS from the git hoster just fine, even way larger
>>>> binary release items, thanks to the browser's HTTPS resume. And yet a
>>>> simple git clone of the same project failed repeatedly.
>>>>
>>>> My deepest apologies if I missed an option to fix or address this.
>>>> But summed up, please consider making git clone recover from hiccups.
>>>>
>>>> Regards,
>>>>
>>>> Ellie
>>>>
>>>> PS: I've seen git hosters have apparent proxy bugs, like timing out
>>>> slower git clone connections from the server side even if the
>>>> transfer is ongoing. A git auto-resume would reduce the impact of that, too.
>>>
>>> I suggest that you look into two git topics: --depth, which controls how much
>> history is obtained in a clone, and sparse-checkout, which describes the part of the
>> repository you will retrieve. You can prune the contents of the repository so that
>> clone is faster, if you do not need all of the history, or all of the files. This is typically
>> done in complex large repositories, particularly those used for production support
>> as release repositories.
> 
> Consider doing the clone with --depth=1 then using git fetch --depth=n as the resume. There are other options that effectively give you a resume, including --deepen=n.
> 
> Build automation, like Jenkins, uses this to speed up the clone/checkout.
> 
Previous: rsbecker@nexbridge.comNext: Jeff King
Message 5 of 43 in “With big repos and slower connections, git clone can be hard to work with”
  1. ellieJun 7, 2024
  2. rsbecker@nexbridge.comJun 7, 2024
  3. ellieJun 8, 2024
  4. rsbecker@nexbridge.comJun 8, 2024
  5. ellieJun 8, 2024
  6. Jeff KingJun 8, 2024
  7. ellieJun 8, 2024
  8. ellieJun 8, 2024
  9. Jeff KingJun 8, 2024
  10. Jeff KingJun 8, 2024
  11. ellieJun 8, 2024
  12. Junio C HamanoJun 8, 2024
  13. ellieJun 8, 2024
  14. Patrick SteinhardtJun 10, 2024
  15. Emily ShafferJun 10, 2024
  16. Junio C HamanoJun 10, 2024
  17. ellieJun 10, 2024
  18. Toon claesJun 13, 2024
  19. Jeff KingJun 11, 2024
  20. Junio C HamanoJun 11, 2024
  21. Sitaram ChamartyJun 29, 2024
  22. Jeff KingJun 11, 2024
  23. Ivan FradeJun 11, 2024
  24. ellieJul 7, 2024
  25. rsbecker@nexbridge.comJul 8, 2024
  26. ellieJul 8, 2024
  27. rsbecker@nexbridge.comJul 8, 2024
  28. ellieJul 8, 2024
  29. Konstantin KhomoutovJul 8, 2024
  30. rsbecker@nexbridge.comJul 8, 2024
  31. ellieJul 8, 2024
  32. rsbecker@nexbridge.comJul 8, 2024
  33. ellieJul 8, 2024
  34. rsbecker@nexbridge.comJul 8, 2024
  35. ellieJul 8, 2024
  36. rsbecker@nexbridge.comJul 8, 2024
  37. Emanuel CziraiJul 8, 2024
  38. Konstantin KhomoutovJul 8, 2024
  39. rsbecker@nexbridge.comJul 8, 2024
  40. ellieJul 14, 2024
  41. ellieJul 24, 2024
  42. EllieSep 8, 2025
  43. EllieSep 30, 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.