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

Re: Bug: Git: Clone: University Network: No Output on Terminal

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Feb 17, 2020, 17:29 UTC
Message-ID
<20200217172954.GH6134@camp.crustytoothpaste.net>
In-Reply-To
<CABVXwf6q1xMFhw+xd5f8GKATwC9k8mrXUkykpGgvTj7hv9pwEw@mail.gmail.com>
On 2020-02-17 at 08:02:44, Manish Devgan wrote:
Show 20 quoted lines
> Hello,
> 
> I am a university student from India and I was trying to clone the
> xfwm4 git repository from the git-url :
> https://git.xfce.org/xfce/xfwm4
> I was trying to clone this repository over my university network and
> it didn't work. I worked my way around by using my mobile
> wireless-hotspot for the same and was able to do it just fine.
> The next day I tried doing the exact same thing since I couldn't get
> an answer from our university if any such firewall was blocking me
> from cloning it. But this time instead of failing to reach the url the
> command ran with the following output:
> 
> gabru-md@bhaalu:~/Desktop$ git clone https://git.xfce.org/xfce/xfwm4
> Cloning into 'xfwm4'...
> 
> after waiting for a few minutes the command didn't fail but it didn't
> show any output/stats like it does when I try to clone a repository
> from Github which is definitely not blocked on the university network.
> for eg.

So it looks like git.xfce.org is using the old dumb HTTP protocol, which basically serves static content. Git has to look up the references, attempt to download each object or pack, and then determine which ones have the objects it needs. The server provides no assistance in that regard.

Show 8 quoted lines
> gabru-md@bhaalu:~/Desktop$ git clone https://github.com/gabru-md/stl-cpp
> Cloning into 'stl-cpp'...
> remote: Enumerating objects: 186, done.
> remote: Counting objects: 100% (186/186), done.
> remote: Compressing objects: 100% (128/128), done.
> remote: Total 186 (delta 92), reused 146 (delta 56), pack-reused 0
> Receiving objects: 100% (186/186), 105.58 KiB | 256.00 KiB/s, done.
> Resolving deltas: 100% (92/92), done.

Here, GitHub uses the smart HTTP protocol. The client fetches the references and then reports what data it has. The server actively computes the differences and sends a single pack containing only the required objects. In addition, newer versions of the smart HTTP protocol contain a sideband where the server can report status, like the "remote:" message you see above. The status messages on the client side come from unpacking and indexing the single pack received.

So this is working by design, although it's confusing for users. The dumb HTTP protocol doesn't know how much stuff it needs to fetch—it could be a single object or pack, or it could be tens of thousands of items—so it's hard to provide any progress report on the client side. Additionally, because the server isn't actively producing a pack and is just serving static files, there's no way for it to provide status output at all.

Hopefully this answers your question, although I agree the answer is a little unsatisfying.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Manish DevganNext: René Scharfe
Message 2 of 7 in “Bug: Git: Clone: University Network: No Output on Terminal”
  1. Manish DevganFeb 17, 2020
  2. brian m. carlsonFeb 17, 2020
  3. René ScharfeFeb 17, 2020
  4. Manish DevganFeb 18, 2020
  5. René ScharfeFeb 18, 2020
  6. Manish DevganFeb 20, 2020
  7. René ScharfeFeb 20, 2020

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.