Looking at diskimage-builder/elements/source-repositories/extra-data.d/98-source-repositories the problematic section seems to be
HAS_REF=$(git --git-dir=$CACHE_PATH/.git name-rev $REPOREF 2>/dev/null || true) if [ -z "$DIB_OFFLINE" -o -z "$HAS_REF" ] ; then echo "Updating cache of $REPOLOCATION in $CACHE_PATH with ref $REPOREF" git --git-dir=$CACHE_PATH/.git fetch --update-head-ok $REPOLOCATION ${REPOREF}:${REPOREF} fi
changing
git --git-dir=$CACHE_PATH/.git fetch --update-head-ok $REPOLOCATION ${REPOREF}:${REPOREF} to git --git-dir=$CACHE_PATH/.git fetch --update-head-ok $REPOLOCATION
eliminates this error - while this may make the fetch more extensive, and slightly slower, given its only updating cached repos and the other approach results in errors, I think the fix is preferable
Looking at diskimage- builder/ elements/ source- repositories/ extra-data. d/98-source- repositories the problematic section seems to be
if [ -z "$DIB_OFFLINE" -o -z "$HAS_REF" ] ; then
fi
changing
to
eliminates this error - while this may make the fetch more extensive, and slightly slower, given its only updating cached repos and the other approach results in errors, I think the fix is preferable