diff --git a/share/tools/dobuild.sh b/share/tools/dobuild.sh
index 9e16187121..b83e00f0d1 100755
--- a/share/tools/dobuild.sh
+++ b/share/tools/dobuild.sh
@@ -61,7 +61,7 @@ if [ -z "${NOCLEAN}" ]; then
 	rm -Rf doc out 2>/dev/null
 
 	echo "===> Check out the new doc"
-	git clone -b main ${DOCGIT} doc || exit 2
+	git clone ${GITARGS} -b main ${DOCGIT} doc || exit 2
 fi
 
 cd $BUILDDIR/doc || exit 1