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

make the invalid-publisher err msg more informative #13941

Merged
merged 6 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/user/trusted-publishers/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ endpoint:
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!
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.

[reusable workflows]: https://docs.github.com/en/actions/using-workflows/reusing-workflows

Expand Down
4 changes: 4 additions & 0 deletions docs/user/trusted-publishers/using-a-publisher.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
Expand All @@ -37,6 +39,8 @@ flow, your diff might look like this:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
+ # Specifying a GitHub environment is optional, but strongly encouraged
+ environment: release
+ permissions:
+ # IMPORTANT: this permission is mandatory for trusted publishing
+ id-token: write
Expand Down