Re: Unable to git clone ports collection

From: Dave Cottlehuber <dch_at_skunkwerks.at>
Date: Wed, 31 Jan 2024 07:48:36 UTC
On Wed, 31 Jan 2024, at 06:15, Paul M Foster wrote:
> Folks:
>
> I'm following the docs at docs.freebsd.org. There's a line which dictates:
>
> git clone https://git.freebsd.org/ports.git /usr/ports
>
> This results in a redirection error. The error:
>
> Cloning into '/usr/ports'
> fatal: unable to update url base from redirection:
>   asked for:
>   https://git.freebsd.org/ports.git/info/refs?service=git-upload-pack
>    redirect: https://cgit.freebsd.org/ports
>
> Nothing is downloaded at /usr/ports and in fact the directory doesn't
> exist.

On a fresh server, this seems to work just fine (here in EU at least)
and that's the same URL I use for fetching daily from ports tree.

> git clone -v https://git.freebsd.org/ports.git /tmp/ports
Cloning into '/tmp/ports'...
POST git-upload-pack (175 bytes)
POST git-upload-pack (gzip 7002 to 3523 bytes)
remote: Enumerating objects: 6084351, done.
remote: Counting objects: 100% (936/936), done.
remote: Compressing objects: 100% (120/120), done.
^C⏎                                                        

So I'm guessing either temporary glitch, or your local mirror
isn't happy?

re-try with:

env GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone -v \
  https://git.freebsd.org/ports.git /usr/ports

and report back anything interesting.

NB I think the internal git url is https://cgit.freebsd.org/ports.git (at least I
need that to commit & push my changes back via ssh), but the one you used seems
entirely legit to me.

A+
Dave