◷ Reading Time: 4 minutes
In this article, we will show you the steps to set up and grant access to a specific repository in GitHub.
If you have a GitHub account with all your organization’s repositories, you can allow individual users to have access to specific project repositories.
- Private repository in your organization’s GitHub account
- Individual GitHub user accounts
- Individual GitHub user’s personal access token
The Steps to Set up and Grant Access to a Specific Repository
1. Create a GitHub account for the specific user
You can create a GitHub account using your organization’s email address. This will be your individual GitHub user account.
2. Create a private repository in your organization’s GitHub account
Log in to the organization’s GitHub account and create a repository.
The repository should be private.
3. Add the individual user as a Collaborator
Navigate to the repository settings.
Under Collaborators, click on Add People.
Search for the individual GitHub Account and add as a collaborator.
At this moment, the invitation is pending until the individual user accepts it.
4. Accept the invitation by the individual user
The individual user account will receive an email to accept the invitation to be a collaborator to the repository.
Accept the invitation.
Now the individual account has access to the specific repository of the organization’s GitHub account.
5. Get individual account’s personal access token
You can follow these steps to generate the access token.
6. Use the token to access the repository
Now you can use the token to access the repository.
If the repository already has a project, you can clone it from the home screen.
You can also use the remote repository under the source control option.