diff --git a/lib/util/git/index.ts b/lib/util/git/index.ts index 3f50ee949631634b9790bb43ca196414c07606ed..938bf1f31b26bcc52ce80b4355add1c61b7554f5 100644 --- a/lib/util/git/index.ts +++ b/lib/util/git/index.ts @@ -79,6 +79,7 @@ function checkForPlatformFailure(err: Error): void { 'Could not resolve host', 'early EOF', 'fatal: bad config', // .gitmodules problem + 'expected flush after ref listing', ]; for (const errorStr of externalHostFailureStrings) { if (err.message.includes(errorStr)) { @@ -179,6 +180,7 @@ async function fetchBranchCommits(): Promise<void> { config.branchCommits[ref.replace('refs/heads/', '')] = sha; }); } catch (err) /* istanbul ignore next */ { + checkForPlatformFailure(err); logger.debug({ err }, 'git error'); if (err.message?.includes('Please ask the owner to check their account')) { throw new Error(REPOSITORY_DISABLED);