Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid-publisher error in publish workflow #217

Closed
hakonanes opened this issue May 14, 2024 · 5 comments
Closed

Invalid-publisher error in publish workflow #217

hakonanes opened this issue May 14, 2024 · 5 comments
Labels

Comments

@hakonanes
Copy link
Member

We get an invalid-publisher error when trying to upload our latest 0.6rc1 build to TestPyPI: https://github.com/pyxem/diffsims/actions/runs/9084675533/job/24966176388

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:pyxem/diffsims:ref:refs/tags/v0.6rc1`
* `repository`: `pyxem/diffsims`
* `repository_owner`: `pyxem`
* `repository_owner_id`: `16704128`
* `job_workflow_ref`: `pyxem/diffsims/.github/workflows/python-publish.yml@refs/tags/v0.6rc1`
* `ref`: `refs/tags/v0.6rc1`

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

Haven't seen this before. And I cannot see the error cause. Any suggestions?

@hakonanes hakonanes added the dev label May 14, 2024
@hakonanes hakonanes changed the title Invali Invalid-publisher error in publish workflow May 14, 2024
@CSSFrancis
Copy link
Member

CSSFrancis commented May 14, 2024

@hakonanes Have you tried just rerunning it? It could just be that some part of the workflow was down for a little bit.

Edit: Should this be fixed by #218?

@hakonanes
Copy link
Member Author

Rerun after about 20 minutes failed.

I've updated the workflow in #218, but would like to keep it open for a day to have a closer look at this tomorrow. Don't think the changes in that PR fixes it, unfortunately.

@CSSFrancis
Copy link
Member

@hakonanes can you log into diffsims on pypi and adjust the Trusted Publishers? It might need ot be adjusted to allow GitHub to push.

@CSSFrancis
Copy link
Member

CSSFrancis commented May 14, 2024

Maybe Relevent? Although I assume you've checked that :)
pyxem/pyxem#974

@hakonanes
Copy link
Member Author

can you log into diffsims on pypi and adjust the Trusted Publishers

I assumed we had set it up correctly... We had not. The trusted publisher entry pointed to the orix repository. Thanks for nudging me to check! I should of course have done that in the first place 😅

I'll merge #218 once checks pass and re-try publishing to PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants