Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do collaborators have commit access on GitHub?

Tags:

git

github

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?

like image 898
Brettski Avatar asked Feb 15 '11 23:02

Brettski


People also ask

Can collaborator commit GitHub?

Yes, it is either your responsibility to properly follow process (i.e., create a branch and then create the pull request to merge to master / release / etc) or/and up to the repo owner to set up permissions so committing directly to master is not possible.

What access does a collaborator have in GitHub?

Collaborator access for a repository owned by a personal account. Collaborators on a personal repository can pull (read) the contents of the repository and push (write) changes to the repository. Note: In a private repository, repository owners can only grant write access to collaborators.

How do collaborators work on GitHub?

Click on the “Settings” tab of your rep, then “Collaborators” then search for Github users and add them by clicking “Add Collaborator”: They'll receive an email letting them know you added them and will be listed as a collaborator.

Who can commit in GitHub?

No, but if the repository is public others can fork it, commit to their own fork. They can then ask you to pull some of the changes in their fork into your repository via a pull-request. Show activity on this post. Nobody can push directly to your repository if you are not already granting them write access.


2 Answers

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.

like image 52
Simone Carletti Avatar answered Oct 03 '22 21:10

Simone Carletti


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).

like image 29
mipadi Avatar answered Oct 03 '22 20:10

mipadi