diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1dd19631e66d6d9ca0f6c0e639629d42ec524dbe..6a4b2e6da8f25dd850edcbb23b4bcf0dd898767e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,7 +35,7 @@ build-env-job:       # This job runs in the build stage, which runs first.
   # docu: https://docs.gitlab.com/ee/ci/docker/using_kaniko.html, this is basically copy-pasted from there
   script:
     - mkdir -p /kaniko/.docker
-    - echo "{\"auths\":{\"${HARBOR_HOST}\":{\"auth\":\"$(echo -n ${HARBOR_USERNAME}:${HARBOR_PASSWORD} | base64)\"}}}" > /kaniko/.docker/config.json
+    - echo -n "{\"auths\":{\"${HARBOR_HOST}\":{\"auth\":\"$(echo -n ${HARBOR_USERNAME}:${HARBOR_PASSWORD} | base64)\"}}}" > /kaniko/.docker/config.json
     # In this task, Kaniko executor is called to build the Image based on the Dockerfile provided with "--dockerfile".
     - echo "CI_PROJECT_DIR=${CI_PROJECT_DIR}"
     - >-