diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f3a2ceb9a28d1bdef4bd9adb1f9205996acac7dd..1140e66dffa7a683a00ee5bf683a95ae6afe59e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -109,7 +109,7 @@ deploy_prod_rabbit:
     - kubeconfig=$(basename $kubekorner_k3s_config)
     # get password from any previous installation
     # if we don't do this the password will get out of sync
-    - pw=$(kubectl --kubeconfig $kubeconfig get secret --namespace geosphere-test geosphere-rabbit-rabbitmq -o jsonpath="{.data.rabbitmq-password}" | base64 -d)
+    - pw=$((kubectl --kubeconfig $kubeconfig get secret --namespace geosphere-test geosphere-rabbit-rabbitmq -o jsonpath="{.data.rabbitmq-password}" || echo "") | base64 -d)
     - auth_sec="geosphere-rabbit-rabbitmq"
     - if [ $pw != "" ]; then EXTRA_ARGS="--set auth.existingPasswordSecret=$auth_sec --set auth.existingErlangSecret=$auth_sec"; fi
     # install third-party rabbitmq server