Restrict Github API access to only one repository of an user

后端 未结 1 1218
一向
一向 2021-01-14 01:26

We have an web application, which lets the user write code and store it in an internal git repository on our server. Now we wanted to allow the user to share his code with h

相关标签:
1条回答
  • 2021-01-14 01:53

    As per jasonrudolph comment, it is not currently possible to restrict API access to a specific repository.

    Deploy keys are the closest thing that provides this type of functionality. (This won't help you from an API perspective, but a deploy key might meet your underlying need.) If your application were to generate an public/private SSH keypair, and the user were to add the public key as a deploy key in the repository, then you could use the private key to access just that one repository (without having access to the user's other repositories).

    0 讨论(0)
提交回复
热议问题