I'm trying to upload a package to pypi using a Gitlab CI job, but I cannot make it work :/ Anyone has a working example?
What I have tried so far in my .gitlab-ci.yaml (from my local machine all of them are working):
Twine with a
.pypircfile- echo "[distutils]" >> ~/.pypirc - echo "index-servers =" >> ~/.pypirc - echo " pypi" >> ~/.pypirc - echo "" >> ~/.pypirc - echo "[pypi]" >> ~/.pypirc - 'echo "repository: https://upload.pypi.org/legacy/" >> ~/.pypirc' - 'echo "username: ${PYPI_USER}" >> ~/.pypirc' - 'echo "password: ${PYPI_PASSWORD}" >> ~/.pypirc' - python3 setup.py check sdist bdist # This will fail if your creds are bad. - cat ~/.pypirc - twine upload dist/* --config-file ~/.pypircSame as before but with
$VARIABLE[...] - 'echo "username: $PYPI_USER" >> ~/.pypirc' - 'echo "password: $PYPI_PASSWORD" >> ~/.pypirc' [...]Two options before but using
python setup.py ... uploadtwine upload dist/* -u $PYPI_USER -p $PYPI_PASSWORDtwine upload dist/*wihtTWINE_USERNAMEandTWINE_PASSWORDenvironment variables.
... and always get a 403 Client Error: Invalid or non-existent authentication information. I'm running out of options...


