poliastro / czml3

Python 3 library to write CZML
https://pypi.org/project/czml3/
MIT License
40 stars 33 forks source link

Publish to PyPi not working #139

Closed Stoops-ML closed 3 months ago

Stoops-ML commented 3 months ago

From the GitHub action:

Error: Trusted publishing exchange failure: Token request failed: the server refused the request for the following reasons:

  • invalid-publisher: valid token, but no corresponding publisher (All lookup strategies exhausted)

This generally indicates a trusted publisher configuration error, but could also indicate an internal error on GitHub or PyPI's part.

The claims rendered below are for debugging purposes only. You should not use them to configure a trusted publisher unless they already match your expectations.

If a claim is not present in the claim set, then it is rendered as MISSING.

  • sub: repo:poliastro/czml3:environment:pypi
  • repository: poliastro/czml3
  • repository_owner: poliastro
  • repository_owner_id: [12](https://github.com/poliastro/czml3/actions/runs/9666271466/job/26665400904#step:4:13)176396
  • job_workflow_ref: poliastro/czml3/.github/workflows/publish-to-pypi.yml@refs/tags/v1.0.0
  • ref: refs/tags/v1.0.0

See https://docs.pypi.org/trusted-publishers/troubleshooting/ for more help.

From PyPi's troubleshooting page:

invalid-pending-publisher and invalid-publisher: the OIDC token itself is well-formed (and has a valid signature), but doesn't match any known (pending) OIDC publisher. This likely indicates a mismatch between the OIDC publisher specified in the user/project settings and the claims represented in the actual OIDC token. Check for typos! If you're using GitHub Actions, check if the workflow is using the same environment as configured when the publisher was configured on PyPI.

astrojuanlu commented 3 months ago

If you're using GitHub Actions, check if the workflow is using the same environment as configured when the publisher was configured on PyPI.

Looking into this

astrojuanlu commented 3 months ago

Fixed!

Noticing this:

Checking dist/czml3-1.0.0-py3-none-any.whl: PASSED with warnings WARNING long_description_content_type missing. defaulting to text/x-rst.
Checking dist/czml3-1.0.0.tar.gz: PASSED with warnings WARNING long_description_content_type missing. defaulting to text/x-rst.

But that's a separate issue.