4

I am using GitHub token as the credential for others people. Can make the token only allows the user to clone and pull, but NOT push or delete.

2 Answers2

1

GitHub tokens do not provide access to a repository, it is mainly to provide authentication of the user. Clone or Pull or push are mainly GitHub repository functions and you can manage specific access using Setting --> Contributors for the repository. Select the "Read" option in the contributors option of Repository Settings.

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Girish
  • 171
  • 2
  • 9
0

GitHub tokens can now (Oct. 2022) provide access to a repository, if you set GitHub App permissions

That way, even a contributor might not have all write access (ie might not trigger a GitHub action, change protection, patch a commit, push a commit, ...

You now can define a much more granular access through those new fine-grained personal access token.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250