diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d71338f0398fac520be04d7eac643de13f70a114..f309d69dcc63e983ea5952d626c3e9a09e3f21a3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,6 +14,7 @@ variables:
   NPM_USERNAME: git
   NPM_PASSWORD: git
   NPM_EMAIL: git@git.de
+  NPM_REGISTRY: https://it-devops-01:4873
 
 cache:
   paths:
@@ -45,11 +46,7 @@ test:
 publish to local npm:
   stage: publish
   before_script:
-    - |
-        npm adduser --registry https://it-devops-01:4873 <<!
-        $NPM_USERNAME
-        $NPM_PASSWORD
-        $NPM_EMAIL
-        !
+    - npm install -g npm-cli-adduser
+    - npm-cli-adduser --registry $NPM_REGISTRY --username $NPM_USERNAME --password $NPM_PASSWORD --email $NPM_PASSWORD
   script:
-    - npm publish --registry https://it-devops-01:4873
\ No newline at end of file
+    - npm publish --registry $NPM_REGISTRY
\ No newline at end of file