git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Manish Devgan <manish.nsit8@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Bug: Git: Clone: University Network: No Output on Terminal
Date: Mon, 17 Feb 2020 17:29:54 +0000	[thread overview]
Message-ID: <20200217172954.GH6134@camp.crustytoothpaste.net> (raw)
In-Reply-To: <CABVXwf6q1xMFhw+xd5f8GKATwC9k8mrXUkykpGgvTj7hv9pwEw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2841 bytes --]

On 2020-02-17 at 08:02:44, Manish Devgan wrote:
> 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.

> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

  reply	other threads:[~2020-02-17 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17  8:02 Bug: Git: Clone: University Network: No Output on Terminal Manish Devgan
2020-02-17 17:29 ` brian m. carlson [this message]
2020-02-17 19:38 ` René Scharfe
2020-02-18 11:25   ` Manish Devgan
2020-02-18 19:24     ` René Scharfe
2020-02-20 10:20       ` Manish Devgan
2020-02-20 16:07         ` René Scharfe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200217172954.GH6134@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=manish.nsit8@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).