You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(publish): pypi trusted publishing always requests the pypi audience #1344
and audience_url at L71-L74), while the mint endpoint is derived from the registry url (L76-L92).
Warehouse instances do not share an audience: TestPyPI expects testpypi, and each index advertises its own at https://<host>/_/oidc/audience (this is what pypa/gh-action-pypi-publish queries). So with url: https://test.pypi.org/legacy/ and trustedPublishing: true, the exchange at https://test.pypi.org/_/oidc/mint-token is refused, and the error tells the user to check their trusted publisher registration, which is not the problem.
The config docs say the opposite: "The token endpoint is derived from the registry url, so TestPyPI and a private index work unchanged" (docs/site/docs-en/configuration/config-file.md:1084).
Suggested fix
GET https://<host>/_/oidc/audience first and request the OIDC token with the returned audience, falling back to pypi only for pypi.org if the call fails. Add a test against the test server for a non-default audience.
Activity
fix(publish): read the pypi trusted publishing audience from the index (