diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 124a0fab120716fec459f50b61c0f53efb2d4431..b7025f39eff8be1d05f2a69e7c4634862b7521ee 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,7 +3,7 @@ stages:
   - test
   - automated_test
 
-.before_script: &before_script
+default:
   before_script:
     - eval $(ssh-agent -s)
     - echo "$SSH_PRIVATE_KEY_GITLAB" | tr -d '\r' | ssh-add -
@@ -25,7 +25,6 @@ checks:
   stage: check
   only: [merge_requests]
   allow_failure: true
-  <<: *before_script
   script:
     - export PATH=/home/gitlab-runner/.local/bin:$PATH
     #  We'd like to run the pre-commit hooks only on files that are being
@@ -42,7 +41,6 @@ checks:
 pytest:
   stage: test
   only: [merge_requests]
-  <<: *before_script
   script:
     - export LANG=C  # Hopefully detect anything relying on locale
     - python3 -m pip install ".[test]"
@@ -66,7 +64,6 @@ automated_test:
   allow_failure: false
   tags:
     - integration
-  <<: *before_script
   script:
     - export LANG=C  # Hopefully detect anything relying on locale
     - python3 -m pip install ".[test]"
@@ -78,7 +75,6 @@ automated_test:
 cython-editable-install-test:
   stage: test
   only: [merge_requests]
-  <<: *before_script
   script:
     - python3 -m pip install -e ".[test]"
     - python3 -m pytest --color yes --verbose ./tests/test_cythonalgs.py