Feature request: read-only access tokens #5317
-
Currently repo access tokens can only be generated with read-write permissions. It'd be useful to have read-only tokens. For example, I mostly develop in R, and to update my packages based on the code stored in a private repo I need to have an access token stored in my machine. That's great, but given the use-case (strictly for updating packages from a repo), I only need this token for reading repos, never for writing. It'd therefore be optimal if I didn't have to give the token write permissions it should never use. I've seen suggestions on SO of creating a fake contributor with read-only permissions and then generating the token with read-write (effectively read-only) permissions for that contributor, but that seems more like a workaround than a solution. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
|
Beta Was this translation helpful? Give feedback.
-
16 major permission categories and 23 "fine-grained" ones, yet no "read only"? That seems like such a basic security permission, I cannot believe it is not in there somewhere. Is there any way to make this work? |
Beta Was this translation helpful? Give feedback.
-
This is a common long-running request: |
Beta Was this translation helpful? Give feedback.
-
This has finally been addressed: https://github.blog/2022-10-18-introducing-fine-grained-personal-access-tokens-for-github/ However, fine-grained access tokens currently have an expiry of max 1 year, limiting their usefulness for things like CI/CD. Many people are requesting no expiry tokens in the feedback thread here: |
Beta Was this translation helpful? Give feedback.
This has finally been addressed:
https://github.blog/2022-10-18-introducing-fine-grained-personal-access-tokens-for-github/
However, fine-grained access tokens currently have an expiry of max 1 year, limiting their usefulness for things like CI/CD.
Many people are requesting no expiry tokens in the feedback thread here:
#36441