Skip to content

Running Code from Private Repo and Publishing Output to Pulic Repo Help #25614

Discussion options

You must be logged in to vote
albert-marrero:
      - name: Checkout Public Repo
        uses: actions/checkout@v2
        with:
          repository: public-repo
          path: data

This means you’re using the GITHUB_TOKEN for authorization when accessing the public repository. For fetching that’s no problem (because a public repo can be fetched by anyone), but pushing won’t work because the GITHUB_TOKEN is scoped to your private repository.

To push to the public repository you’ll have to create a PAT that grants access for pushing to your public repository (repo scope), store it as a secret for your private repository, and provide that secret to actions/checkout as its token option.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants