If your repository is private, follow these steps to generate a token:
- Go to your GitHub account settings.
- Navigate to "Developer settings" > "Personal access tokens" > "Fine-grained tokens".
- Click "Generate new token".
- Set an expiration date (choose the maximum allowed for convenience).
- Under "Repository access", select the private repository you want to connect.
- In the "Permissions" section, find "Contents" and set it to "Read-only".
- Click "Generate token" at the bottom of the page.
- Copy the generated token.