Git & GitHub Course
Git & GitHub
/
Intermediate

Repository Permissions

Definition

The access levels granted to users or teams on a specific repository, dictating what actions they can perform (Read, Triage, Write, Maintain, Admin).

Explain Like I'm New

You don't want the new intern accidentally deleting the entire company database code. You give the intern 'Read' access (they can clone the code but can't push changes directly). You give the senior devs 'Write' access (they can push code). You give yourself 'Admin' access (you can delete the repository).

Real World Example

In Open Source (like React), 99.9% of the world has 'Read' access. Only the core Facebook employees have 'Write' access.

Common Use Cases

  • •Security
  • •Preventing accidental code destruction

Terminal Output

bash / terminal
/* Standard GitHub Permission Levels: 1. Read: Can clone, pull, and open issues. (Interns/Public) 2. Triage: Can manage issues and PRs, but cannot push code. (Project Managers) 3. Write: Can push code directly to branches. (Standard Developers) 4. Maintain: Can manage repository settings and permissions. (Tech Leads) 5. Admin: Can do everything, including deleting the repo. (CTO/Founders) */

Interview Questions

basic

  • If you have 'Read' access, how do you propose a code change to the repository?

intermediate

  • What permission level allows someone to forcefully delete a repository?

Flash Cards

Question

How to propose changes?

Click to reveal answer
Answer

You must Fork the repository, make changes on your fork, and then submit a Pull Request back to the original repository.

Question

Delete repo?

Click to reveal answer
Answer

Only the 'Admin' (or Owner) level can delete a repository, transfer ownership, or change repository visibility (Public to Private).