From: "Anselm Schüler" <mail@anselmschueler.com>
To: git@vger.kernel.org
Subject: Git maintenance fails without meaningful error message if any remote is no longer available
Date: Thu, 30 Apr 2026 01:13:22 +0200 [thread overview]
Message-ID: <0f3ef394-d96a-42f2-825d-53cb475a2363@anselmschueler.com> (raw)
I have a repo with multiple remotes, one of which no longer exists. When
git-maintenance runs on it, it fails during the prefetch stage because
that remote doesn’t exist anymore, and gives a mostly unhelpful error
message:
$ git maintenance run --schedule=daily
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: failed to prefetch remotes
error: task 'prefetch' failed
I think that
1. git-maintenance should report which remote it’s encountering an error on
2. git-maintenance should continue fetching other remotes even if one fails
Now, on my system, the systemd timers for git-maintenance use
git-for-each-repo. Not sure if that’s upstream behaviour or something
Nix/home-manager does. But if it is upstream behaviour, it would also be
great to report the repo the error comes from, since I basically had to
guess right now which repo was erroring. Luckily I have only three repos
under maintenance so that was fine.
Let me know if you agree that this should be done. I would be open to
writing a patch (no promises though)
Anselm
next reply other threads:[~2026-04-29 23:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 23:13 Anselm Schüler [this message]
2026-05-05 9:59 ` Git maintenance fails without meaningful error message if any remote is no longer available Phillip Wood
2026-05-05 10:05 ` Anselm Schüler
2026-05-06 14:06 ` Phillip Wood
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f3ef394-d96a-42f2-825d-53cb475a2363@anselmschueler.com \
--to=mail@anselmschueler.com \
--cc=git@vger.kernel.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox