Is Fine-grained Personal Access Tokens compotable to Checking out private repository #160535
Replies: 2 comments
-
Same problem |
Beta Was this translation helpful? Give feedback.
-
Are Fine-grained Personal Access Tokens (PATs) Compatible with Checking Out Private Repositories?Short answer: Key Points
How to Use Fine-grained PATs for Checking Out Private Repositories
Advantages Over Classic PATs
References
In summary: If you need a step-by-step guide with screenshots or run into any issues, let me know! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I don't get this to work. I have a private repo I need to check out and use in another private repo of the organization.
So, inside the workflow, I'm doing this:
- name: Checkout private repository uses: actions/checkout@v4 with: repository: username/private-repo-name ref: main token: ${{ secrets.PAT }}
Here is the error message I'm getting
Retrieving the default branch name Not Found - https://docs.github.com/rest/repos/repos#get-a-repository
It seems to be working fine when I use the "classic" tokens. I've set all the permissions to read and write for testing purposes, so there should be no issues there.
I am considering the following points:
Beta Was this translation helpful? Give feedback.
All reactions