diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index 83b4553f2b01673f3ce171b99353a926225f1948..b98b26eaf37e1886d9ec5010e0d6ddede9f41897 100644
--- a/gitlab/functions.sh
+++ b/gitlab/functions.sh
@@ -135,7 +135,7 @@ run_cmd() {
 # Checks if a file exists on the remote location
 # $1: Path to the file to check on the server
 dav_exists() {
-  curl --head --silent --location ${DOCSERVER}/${1} | grep HTTP | tail -n 1 | grep -q 200
+  curl --head --silent --user "${DOCUSER}:${DOCPASS}" --location ${DOCSERVER}/${1} | grep HTTP | tail -n 1 | grep -q 200
   return $?
 }