Skip to content
Discussion options

You must be logged in to vote

Is there any "Personal access tokens" option that will only give a read access to a raw file?

There isn't, and even if it did a read-only PAT would give access to all your private repositories, so it's probably not what you want.

The correct solution is to give the people who need to read that file read access to the repository, so they can use their own tokens.

As a side note, it's strongly recommended you send the token in an Authorization header instead of including it in the URL, as described here: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#oauth2-token-sent-in-a-header

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ArshakKroyan
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
Comment options

You must be logged in to vote
1 reply
@ebndev
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product Feedback Share your thoughts and suggestions on GitHub features and improvements
5 participants