Hi Arnold,

> I am seeing this:
> 
> $ git clone https://git.savannah.gnu.org/git/gnulib.git
> Cloning into 'gnulib'...
> remote: Counting objects: 332453, done.
> remote: fatal: unable to create thread: Resource temporarily unavailable
> remote: aborting due to possible repository corruption on the remote side.
> fatal: protocol error: bad pack header
> 
> If I use a git:// URL, I get
> 
> $ git clone git://git.savannah.gnu.org/gnulib.git
> Cloning into 'gnulib'...
> fatal: read error: Connection reset by peer
> 
> Any ideas what's happening?

The cause are the persistent denial-of-service attacks of AI scrapbots
on many web and git servers in the worlds, in particular those of GNU and
the FSF.

The workaround is to append the following lines to your $HOME/.gitconfig:

# See
# 
https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf
# https://git-scm.com/docs/git-clone#_git_urls
[url "git://git.git.savannah.gnu.org/"]
        insteadOf = git://git.savannah.gnu.org/
[url "https://https.git.savannah.gnu.org/git/";]
        insteadOf = https://git.savannah.gnu.org/git/
[url "https://github.com/coreutils/gnulib.git";]
        insteadOf = git://git.savannah.gnu.org/gnulib.git
        insteadOf = https://git.savannah.gnu.org/git/gnulib.git

This will have the effect that git uses read-only mirrors, that are more
efficient.

Note that these mirrors have some delays (up to 10 minutes sometimes);
therefore don't be surprised if after receiving a commit notification
you don't see the commit immediately and have to wait for a while until
it appears.

Note that I got the syntax wrong in my previous message on this topic [1];
apologies for that.

Bruno

[1] https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00077.html




Reply via email to