diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ef1e3022abaf1e7acb61d269b9d3eafd37d10e16..b81e40954ac8b17fe884ff8b9250263088f21054 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,7 +37,6 @@ Publish to pypi and update repository:
     - git config --global user.name ${GITLAB_USER_NAME}
     - git add pyproject.toml
     - git commit -m "Bump version"
-    - git remote add origin https://${ACCESS_TOKEN_NAME}:${ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git && git push -o ci.skip origin HEAD:master
-    - poetry publish --build --username ${PYPI_USER} --password ${PYPI_PASSWORD}
+    - git remote add local https://${ACCESS_TOKEN_NAME}:${ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git && git push -o ci.skip local HEAD:master && poetry publish --build --username ${PYPI_USER} --password ${PYPI_PASSWORD}
   only:
     - master