Solved Unable to fetch full ports tree via git when --depth 1 is omitted

I'm a very long-time and experienced FreeBSD user (have checked-out / updated ports trees more than 1000 times).

Until this weekend (since FreeBSD's migration to git), it has always worked for me to checkout a full clone of the ports tree using the command:

Code:
git clone https://git.FreeBSD.org/ports.git /usr/ports

I have tried the above over a dozen times the last 12+ hours, but every one has failed with the error:

Code:
error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504
fatal: expected 'acknowledgments'

The git process just sits there for almost-exactly 5 minutes, consuming no CPU time, then it errors and exits.

The latest instructions in the Handbook ( https://docs.freebsd.org/en/books/handbook/ports/#ports-using-installation-methods ) do work properly for me to checkout a "shallow" clone when I use --depth 1, but then I am not able to see full history like I have in the past. I require full history for my project.

I even tried git fetch --unshallow after I already had a shallow tree, but that failed with the same error.

I'm running:
  • FreeBSD 14.5-RELEASE
  • devel/git 2.56.0 (built from ports last night out of a --depth 1 tree)
Maybe a recent git bug? Maybe due to high load on the git servers? Or are full clones being administratively denied now for some reason? Any idea when or how I might be able to fetch an up-to-date non-shallow clone again?
 
It could be something is down on the git.freebsd.org side. Try cloning from the github.com.

git clone --depth 1 https://github.com/freebsd/freebsd-ports.git /usr/ports

You might actually get better speeds and stuff with github. Once I had to do some complex rebasing and git.freebsd.org flat out didn't work for that, but github.com worked great.
 
Yep -- that worked! Thank you!!

And I was able to update my --depth 1 repo from the one I cloned directly from github after using your method by running:

git pull /path/to/later/local/repo

Now my original repo is full clone, with proper history, and thankfully git didn't change the repo URL to the other local path, so hopefully future updates will work smoothly when the upstream problem is resolved. Thanks again!
 
I'm marking this thread as "Solved" because loveydovey's work-around is acceptable.

For me, git.freebsd.org still appears broken. FWIW: git.freebsd.org resolves to the same IP address in both these cases:
  • Working: git fetch --depth 1 https://git.freebsd.org/ports.git
  • Broken: git fetch https://git.freebsd.org/ports.git
So I believe there is still some upstream problem specific to git.freebsd.org.
 
Back
Top