Open geudrik opened 1 week ago
When the following is run in a CI job on GL, a 400 is returned, indicating that Auth succeeded (the 400 is expected on successful auth)
- "curl -v --header \"JOB-TOKEN: ${CI_JOB_TOKEN}\" \"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi\""
Using the following to attempt to push a package results in a 401, when from what I can tell, it shouldn't
- poetry config repositories.gitlab "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi" - poetry config http-basic.gitlab "gitlab-ci-token" "${CI_JOB_TOKEN}" - poetry publish -r gitlab
Am I just doing something wrong?
The aim is to push a built python package into the GL registry. The work-around is to use Twine
Publish with Twine: image: python:3.12 stage: Publish needs: - job: Discern New Version Tag artifacts: true - job: Build Package artifacts: true script: - pip install twine - export TWINE_PASSWORD=${CI_JOB_TOKEN} - export TWINE_USERNAME=gitlab-ci-token - python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/* rules: - if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE != "merge_request_event"
pip
Debian [python 3.12 image]
Poetry (version 1.8.3)
n/a
No response
I guess you are not reading the docs, and you are not searching for duplicates.
Probably https://python-poetry.org/docs/cli#usage
Will give this a shot, thanks!
Description
When the following is run in a CI job on GL, a 400 is returned, indicating that Auth succeeded (the 400 is expected on successful auth)
Using the following to attempt to push a package results in a 401, when from what I can tell, it shouldn't
Am I just doing something wrong?
Workarounds
The aim is to push a built python package into the GL registry. The work-around is to use Twine
Poetry Installation Method
pip
Operating System
Debian [python 3.12 image]
Poetry Version
Poetry (version 1.8.3)
Poetry Configuration
Python Sysconfig
No response
Example pyproject.toml
No response
Poetry Runtime Logs