Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Give permissions on project folder in github

Tags:

github

I have 10 main folders in this project I want to give access to the external team just in one sub-folder in my git repository so that they can make changes and submit a Pull Request.

Is there a way of doing it? If not, can you please suggest a better way?

like image 1000
Rashid Avatar asked Nov 12 '16 20:11

Rashid


People also ask

How do I give someone access to a folder in GitHub?

On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. In the "Access" section of the sidebar, click Collaborators & teams. Under "Manage access", in the search field, start typing the name of the team or person you'd like to find.

How do I change permissions on GitHub?

Select the GitHub App whose permissions you want to change. In the left sidebar, click Permissions & webhooks. Modify the permissions you'd like to change. For each type of permission, select either "Read-only", "Read & write", or "No access" from the dropdown.

Who has the full access to project repository?

Owner access for a repository owned by a personal accountThe repository owner has full control of the repository. In addition to the actions that any collaborator can perform, the repository owner can perform the following actions.


1 Answers

There is no such access-rights-mechanism implemented on GitHub repositories out of the box.

Using a submodule

Using a submodule does the trick, and is pretty much easy to set up. You can give the customers full access to the submodule repository, while you add it to your main project repository.

Note that the StackOverflow question "Using someone else's repo as a Git Submodule on GitHub" and its answer are also worth reading.

This is in my opinion the most simple and straightforward way to do it.

Using a webhook

If you really don't want to use submodules, you can still restrict access rights by creating a GitHub webhook that implements this mechanism. The Git SCM documentation explains how to do that part.

like image 123
dashdashzako Avatar answered Sep 24 '22 21:09

dashdashzako