Reputation: 483
I'm trying to figure out, if it is possible on GitHub to give someone read-only access to a specific private repository, allow only to see content, without the possibility of collaboration to contribute with change in the code or readme markup
Upvotes: 5
Views: 8769
Reputation: 150
You can use read-only SSH Deploy Keys for this.
On GitHub.com, go to your repository > Settings > Deploy Keys.
GitHub's detailed documentation: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys
Upvotes: 0
Reputation: 444
This is only possible for private repositories managed by organisations.
If your repository is an organisation one, you can visit:
You can then add a collaborator and set their permission level to:
- Read: Recommended for non-code contributors who want to view or discuss your project
- Triage: Recommended for contributors who need to proactively manage issues and pull requests without write access
- Write: Recommended for contributors who actively push to your project
- Maintain: Recommended for project managers who need to manage the repository without access to sensitive or destructive actions
- Admin: Recommended for people who need full access to the project, including sensitive and destructive actions like managing security or deleting a repository
Upvotes: 5