Skip to content

fix(ci): publish needs contents: read to check out the repo - #16

Merged
hugo8xx merged 1 commit into
mainfrom
fix/publish-needs-contents-read
Aug 25, 2026
Merged

fix(ci): publish needs contents: read to check out the repo#16
hugo8xx merged 1 commit into
mainfrom
fix/publish-needs-contents-read

Conversation

@hugo8xx

@hugo8xx hugo8xx commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

id-token: write on its own left the publish job without contents: read. Naming any permission on a job replaces the default set — so actions/checkout had no read scope and failed:

remote: Repository not found.
fatal: repository 'https://github.com/khwanlabs/khwan-mcp/' not found

Which reads like the repository is gone rather than like a missing scope.

It only bites on a private repo — a public one checks out without the permission. That is why the first package published fine this way and the next did not, and why it is fixed in all three rather than only where it broke.

Caught by the v0.3.2 release of khwan-mcp, which failed at checkout before it ever reached PyPI. Nothing was published, so the tag can simply be re-released once this is in.

Naming any permission on a job REPLACES the default set, so id-token: write on
its own left the job without contents: read. actions/checkout then failed with

    remote: Repository not found.
    fatal: repository 'https://github.com/khwanlabs/khwan-mcp/' not found

which reads like the repository is gone rather than like a missing scope, and
only happens on a private one — a public repo checks out without it, which is why
this passed on the first package and failed on the next.

Fixed in all three so the same release does not have to be diagnosed twice.
@hugo8xx
hugo8xx merged commit 8183d21 into main Aug 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant