I'm trying to checkout a private repo inside my GitHub pipeline, and the following is my pipeline code,
build:
runs-on: ubuntu-latest
steps:
- name: Checkout pickezy backend
uses: actions/checkout@v2
with:
repository: Madurad/jenkinsfiles
token: ${{ secrets.GITHUB_TOKEN }}
ref: master
But when I run this I get the following error saying, "repository not found" but it's in my githiub org. and it's a private repo.

It does not seem like an auth error. Could anyone please help me to resolve this issue? Anything I've missed?
You can add the missing permission in the top level of the YAML file:
permissions:
contents: read
Note that I did not need to specify token: ${{ secrets.GITHUB_TOKEN }} in the checkout step.
This solution is based on an auto-completion from GitHub Copilot. It works, but I did no further research.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With