diff --git a/capif/templates/ci_staging.gitlab-ci.yml b/capif/templates/ci_staging.gitlab-ci.yml
index 48af42f45c35adb61ec3aef9d87a6183dcf09abb..b34f0b0d2f0b0de70f98876884b7a746b3ca43c2 100644
--- a/capif/templates/ci_staging.gitlab-ci.yml
+++ b/capif/templates/ci_staging.gitlab-ci.yml
@@ -245,7 +245,7 @@ staging_build_and_push:
    - export TMP_PWD=$PWD
    - echo "TMP_PWD=$TMP_PWD"
    - echo "### docker login###"
-   - docker login --username $CI_REGISTRY_USER --password $CI_JOB_TOKEN $CI_REGISTRY
+   - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin
    - echo "----------------------------------------------------"
    - echo "### build and push nginx image###"
    - cd $TMP_PWD/services/nginx/