42

One thing I noticed: Using the GitHub UI, I added a collaborator to a repository. I saw that they committed changes without any authority / approval from me. It was a private repository.

With private repositories, how do I give someone read access versus write access?

2 Answers 2

46

With private repositories, how do I give someone read access versus write access?

This kind of permission is not available for simple accounts. When you add an user as a collaborator, he gains read/write permissions.

The story changes if you own an Organization. Organizations contains teams and each team can have different level of access, including read-only. You can assign users to a specific read-only group, and they will only have pull access to the repositories.

1
  • @Simone: Does it also mean that the collaborators can "accept" their own pull requests on behalf of the repo owner? stackoverflow.com/q/8502540/583539
    – moey
    Commented Dec 14, 2011 at 14:23
8

Private repositories in an ordinary user account are an all-or-nothing deal: either someone has full read/write access (i.e., they're a collaborator) or they have no access. However, if you set up an organization, create the repo under the aegis of the organization, and then add the collaborator, you have much more fine-grained control (including giving read-only access to a private repo).

2
  • 1
    Or you make your repository public, then everyone (who is not a collaborator) has read-only access. Commented Feb 16, 2011 at 10:18
  • 2
    @Paŭlo Ebermann: True, but...not really a good option if you need to keep the repo private.
    – mipadi
    Commented Feb 16, 2011 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.