diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index f1921e8aa917d7cf1aacfe64806285ca56cdf86e..e226657a0a473cd02bd5b56ded3d4d36746230ba 100644
--- a/gitlab/functions.sh
+++ b/gitlab/functions.sh
@@ -81,7 +81,7 @@ username: ${PYPIUSER}
 password: ${PYPIPASS}
 
 [staging]
-repository: https://testpypi.python.org/
+repository: ${TESTSERVER}
 username: ${PYPIUSER}
 password: ${PYPIPASS}
 EOT
@@ -159,10 +159,10 @@ BOB_PREFIX_PATH=${CONDA_FOLDER}/envs/bob-devel-${PYVER}
 BOB_DOCUMENTATION_SERVER="${DOCSERVER}/software/bob/docs/latest/bob/%s/master/"
 
 if [ -z "${PYPISERVER}" ]; then
-  PYPISERVER="https://pypi.python.org"
+  PYPISERVER="https://pypi.python.org/pypi"
 fi
 
-TESTSERVER=https://testpypi.python.org
+TESTSERVER=https://testpypi.python.org/pypi
 
 check_env ARCH
 check_env PYVER