Chapter 01Lesson 01~90 minutes

GitHub Platform Foundations, Plans, Accounts, Organizations, and Repository Models: Concepts, Architecture, and Mental Model

Build a durable mental model of GitHub as a hosted platform layered on Git, with explicit account, ownership, visibility, permission, plan, deployment, and trust boundaries.

FoundationsGit vs GitHubAccounts & ownershipPermissions

Learning objectives

  • Explain which state belongs to core Git and which state exists only in GitHub-hosted resources.
  • Distinguish user, organization, and enterprise accounts without treating organizations as shared login identities.
  • Explain personal versus organization repository ownership and the role of collaborators, teams, and repository roles.
  • Distinguish public, private, and internal visibility and identify internal visibility as an Enterprise Cloud/enterprise-account capability.
  • Differentiate GitHub.com, GitHub Enterprise Cloud, and GitHub Enterprise Server and select the correct documentation context.
  • Use read-only UI, GitHub CLI, REST, and Git inspection to build a hosted-state inventory before changing anything.
Shell notation in this lesson: multi-line examples that use a trailing \, command substitution such as $(...), test, printf, or tee are labeled for Git Bash/Bash/zsh. On PowerShell, run the same git/gh arguments on one line or use PowerShell's backtick for continuation; use PowerShell-native file/evidence commands where an equivalent is shown. The GitHub resource semantics are the same across shells.

1. The practical problem: Git history is not the whole delivery system

You already know the essential Git idea: a local repository contains commits, branches, tags, configuration, and references that you can inspect and change with Git. That model is necessary, but it does not answer many questions a delivery team must answer every day. Who may push to the shared repository? Where do code reviews live? Who owns repository settings? Where are issues, workflow runs, release assets, security alerts, and organization policies stored? Which controls are available on this account or deployment?

GitHub is the hosted platform that answers those additional questions. It hosts Git repositories, but it also stores platform resources and policy state that are not Git objects. A pull request, an issue, a repository role, a ruleset, a workflow run, and an organization membership do not become commit objects merely because they refer to commits.

Prerequisite boundary: this course assumes basic Git fluency—working tree, commits, branches, remotes, fetch, and push—but assumes no prior GitHub product knowledge. When Git mechanics explain GitHub behavior, we will re-anchor them briefly instead of reteaching the Git course.
Availability snapshot: product behavior and plan entitlements were checked against current GitHub documentation on 2026-08-19. GitHub is a fast-changing hosted product. When a feature is plan-, visibility-, policy-, or deployment-sensitive, the lesson tells you to verify the current documentation rather than memorize an entitlement forever.

2. Git versus GitHub: two layers that cooperate

A useful mental model is to separate repository history from hosted collaboration state. Git knows how to create and exchange commits and references. GitHub accepts Git network operations and then surrounds the repository with web, API, identity, authorization, review, automation, security, and governance features.

Local Git state and GitHub-hosted state are related, but they are not the same database
flowchart TD
  L["Local Git clone\nworking tree + index + objects + refs"] -->|git push / fetch| R["Hosted Git repository\nobjects + refs"]
  U["GitHub user account"] -->|authenticated action| P["GitHub platform resources"]
  R --> P
  P --> PR["Pull requests / reviews"]
  P --> I["Issues / Projects"]
  P --> A["Actions / checks"]
  P --> S["Security / releases / packages"]
  O["Organization / enterprise policy"] -->|authorization + governance| P
          

The solid Git arrow transfers repository objects and requests reference updates. The account arrow represents an authenticated GitHub action. The policy arrow represents authorization and governance. A local clone can continue to create commits while GitHub is unavailable; however, GitHub-specific collaboration resources remain on the platform.

Question Primarily Git Primarily GitHub
What commit is my local branch pointing to? git rev-parse, refs, object database GitHub may display the same ref after synchronization, but Git defines the commit/ref model.
Who may change repository settings? Not a core Git authorization concept GitHub account/repository role and organization policy
What code was proposed for review? Commits and diffs exist in Git Pull-request conversation, review decisions, checks, and merge policy are hosted resources.
Was a workflow run successful? No workflow-run object exists in Git GitHub Actions stores run/job/log/check state.

3. Accounts: people sign in; organizations and enterprises organize resources

GitHub documentation distinguishes three account types: user accounts, organization accounts, and enterprise accounts. Every person signs in with a user account. On GitHub.com, a normal individually managed user account is a personal account. Enterprise deployments can also use managed user accounts provisioned by an identity system.

An organization is a shared resource container for collaboration. It can own repositories and teams, and it has organization-level roles and policies. An organization is not a shared username that several engineers should sign into. Team members continue to act through their own user identities.

An enterprise account provides centralized management across organizations. It is an administrative boundary above one or more organizations, not a replacement for Git repositories and not a normal human login identity.

Account/resource What it represents Typical ownership/control Beginner trap
User / personal account An individual identity on GitHub Can own repositories and other personal resources Treating it as equivalent to Git commit author metadata
Organization account A shared collaboration and resource boundary Owners, members, teams, repository roles Trying to “log in as the organization”
Enterprise account Central administration across organizations Enterprise roles/policies; exact capabilities depend on enterprise type and deployment Assuming every enterprise feature exists in every plan or GHES release

4. Repository ownership: personal repositories and organization repositories

Every GitHub repository has an owner as part of its stable coordinate: OWNER/REPO. For a repository such as learner-example/platform-lab, the first component identifies the account that owns the repository. Ownership matters because it determines the surrounding access model, policies, billing context, and administration boundary.

A repository owned by a personal account has an owner plus collaborators. Organization repositories have a richer access model: organization members, outside collaborators, teams, base permissions, and repository roles can all participate. This is one reason mature teams usually prefer organization ownership for shared production repositories: access is tied to organizational governance rather than one individual's personal resource boundary.

Ownership is not authorship. The repository owner controls the GitHub resource. A Git commit separately contains author/committer metadata. A commit can be present in a repository even when its author is not the repository owner.

5. Roles and permissions: authenticate first, authorize second

Authentication answers “which account is making this request?” Authorization answers “may that account perform this action on this resource?” GitHub roles bundle permissions so teams do not have to grant every individual action separately.

For organization repositories, GitHub currently documents five standard repository roles from least to most access: Read, Triage, Write, Maintain, and Admin. Their purpose is not status; it is least-privilege separation. Someone who manages issues may need Triage without code write access. A project manager may need Maintain without destructive Admin powers.

Role Intent Example need Why not automatically grant more?
Read View/discuss repository content Stakeholder or reviewer who does not push Write access would expand change capability unnecessarily.
Triage Manage issues/discussions/PR triage without write access Support or triage team Issue management does not require source push rights.
Write Active code contribution Developer who pushes branches Repository administration is a separate responsibility.
Maintain Manage repository without some sensitive/destructive actions Project maintainer Admin is reserved for full control.
Admin Full repository administration Trusted repository administrator Includes sensitive/destructive capabilities; grant sparingly.

Personal-account repositories use a simpler owner/collaborator model. Later chapters will go deeper into organization/team roles. For now, remember that a successful login does not imply write, admin, organization-owner, or enterprise-owner access.

6. Repository visibility: who can see the repository?

Visibility is a separate axis from your Git branch structure. A private repository is not “a private branch,” and a public repository does not make every platform operation anonymous or unrestricted.

Visibility Meaning Availability for this course Important implication
Public Repository content is accessible to everyone on the internet. Mandatory labs can use a disposable public repository on GitHub Free. Never place secrets, employer code, or sensitive data in the lab.
Private Access is limited to the owner and authorized people/resources. Personal and organization private repositories exist, but feature depth can vary by plan/policy. “Private” reduces visibility; it does not remove the need for least privilege and secure credentials.
Internal Visible to members of the same enterprise under GitHub Enterprise Cloud rules. Optional/enterprise-only observation in this chapter. Do not use “internal” as a synonym for private. It is a distinct enterprise visibility level.
Security-sensitive operation: changing repository visibility has significant consequences for forks, exposure, Actions logs, security features, and other hosted state. This chapter does not require a visibility change. Use a repository created with the intended visibility instead.

7. GitHub.com, Enterprise Cloud, and Enterprise Server

“GitHub” can refer to more than one deployment context. GitHub.com is GitHub's hosted service used by Free, Pro, Team, and Enterprise Cloud customers. GitHub Enterprise Cloud is GitHub-hosted enterprise functionality with an enterprise account and enterprise governance features. GitHub Enterprise Server (GHES) is a self-hosted GitHub platform that an organization operates on its own infrastructure or cloud environment.

Deployment Who hosts the platform? Update model Documentation discipline
GitHub.com / Free, Pro, Team GitHub Hosted service evolves continuously Use Free, Pro & Team docs for the relevant feature.
GitHub Enterprise Cloud GitHub Hosted service with enterprise account/policy options Select Enterprise Cloud docs and verify enterprise type/policy.
GitHub Enterprise Server Your organization Versioned server releases; organization controls upgrades Select the exact installed GHES version. Do not copy GitHub.com behavior blindly.

If your employer uses GHES, the hostname may be something like github.example.invalid rather than github.com. GitHub CLI and APIs can target different hosts, so host identity becomes part of your operational state.

8. Plans are product policy, not Git architecture

GitHub offers plans for personal accounts, organizations, and enterprises. Plans influence which hosted capabilities are available, particularly around private repositories, governance, security, support, and metered products. Those entitlements change over time. They are not properties of a Git commit or protocol.

For that reason, this course does not ask you to memorize prices, minutes, storage quotas, or a frozen entitlement matrix. When a chapter needs a plan-sensitive feature, it will include an Availability note and link to current official documentation. The mandatory path remains free-compatible wherever a live hosted feature is necessary.

Operational habit: when a UI control is missing, test three hypotheses separately: (1) the feature is not included for this plan/visibility/deployment; (2) your account lacks permission; or (3) the feature is controlled or disabled by organization/enterprise policy.

9. GitHub resources are not all Git objects

One of the most important boundaries in the course is knowing what can be reconstructed from Git data and what exists only in the hosted platform.

State Lives in Git? Lives in GitHub platform? Can a normal clone reproduce it?
Commit, tree, blob, tag object Yes GitHub hosts copies when pushed Yes, subject to what was transferred.
Branch/tag ref Yes Hosted refs exist in the remote repository Fetch can obtain relevant refs/objects.
Pull-request conversation/reviews No Yes No; Git commits alone do not contain review discussion.
Issue, Project, repository role No Yes No.
Workflow run/log/check No as a Git object Yes No; workflow files may be cloned, run history is hosted state.
Repository settings / visibility / rules No Yes No.

10. Read-only inspection first

Before changing anything, collect a small state report. The following examples deliberately use the public DevOps Academy repository so the resource is harmless to inspect. The web UI is enough for the first pass; GitHub CLI and REST are optional additional views.

Web UI

  1. Open mohammadijoo/DevOps_Academy on GitHub.
  2. Read the owner and repository name from the page header/URL.
  3. Observe the current default branch selector and visible repository tabs.
  4. Do not infer permissions from visibility alone; public read access is different from write/admin access.

GitHub CLI (read-only)

gh repo view mohammadijoo/DevOps_Academy \
  --json nameWithOwner,visibility,defaultBranchRef,isInOrganization,viewerPermission,url \
  --jq '{name: .nameWithOwner, visibility, defaultBranch: .defaultBranchRef.name, inOrganization: .isInOrganization, viewerPermission, url}'

viewerPermission is especially useful because it asks “what may the authenticated viewer do here?” rather than assuming a role from repository visibility.

REST API (public, read-only)

curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2026-03-10" \
  https://api.github.com/repos/mohammadijoo/DevOps_Academy

The repository endpoint returns hosted metadata such as full_name, owner, visibility, and default_branch. Public data can be queried without authentication, but unauthenticated API requests have a much lower rate limit. Later automation chapters will handle authentication and rate limits systematically.

Credential hygiene: never add gh auth status --show-token to screenshots, lesson logs, bug reports, or chat prompts. This course uses gh auth status only to verify identity/host without revealing token material.

11. Git commit identity and GitHub account identity are different systems

A commit contains author and committer metadata such as a name and email. Git does not require those strings to be the same as the account currently authenticated to GitHub CLI. GitHub may associate commits with accounts under certain conditions, but a Git commit's author field is not itself proof that the person controlled a GitHub account or authenticated the push.

git log -1 --format='author=%an <%ae>%ncommitter=%cn <%ce>%ncommit=%H'
gh auth status --active --hostname github.com

These commands answer different questions. The first reads local commit metadata. The second tests the GitHub CLI's active authenticated account for a host. Later security chapters will introduce stronger authenticity mechanisms and credential hygiene.

12. A permission-aware request flow

Successful GitHub mutation requires the right identity, resource, and permission
flowchart TD
  H["Human / automation"] -->|authenticate| A["GitHub account or app identity"]
  A -->|target OWNER/REPO| R["Repository resource"]
  P["Repository / org / enterprise policy"] -->|authorize or reject| R
  R -->|Git operation| G["Git refs + objects"]
  R -->|platform operation| X["Issues / PRs / settings / Actions / security"]
          

A correct credential aimed at the wrong host or repository can still fail. A correct identity can still lack permission. A role can be further constrained by repository, organization, or enterprise policy. This layered diagnosis will recur throughout the course.

13. Why this matters in DevOps

Delivery automation makes these boundaries operationally important. A CI system may fetch a commit successfully but be unable to publish a release. A developer may push a branch but be unable to change a ruleset. An organization owner may control repository membership while an enterprise owner controls a higher-level policy. A Git backup can preserve source history yet omit hosted issues, reviews, settings, and audit evidence.

The production habit is to name the layer explicitly: Git state, GitHub repository resource, account/organization/enterprise scope, permission, plan/deployment, and external integration. Troubleshooting becomes much faster when these layers are not blurred together.

14. Common misconceptions

Misconception Better model
“GitHub is Git.” GitHub hosts Git repositories and adds platform resources, identity, policy, automation, security, APIs, and governance.
“An organization is a shared login.” People authenticate with user accounts; the organization is a shared resource/policy boundary.
“Public means I can push.” Public primarily describes visibility. Mutation still requires authorization.
“Private means fully secure.” Private visibility reduces access; credentials, roles, policy, workflow trust, and secret handling still matter.
“Admin is the normal developer role.” Grant the least role that satisfies the job.
“If a control is missing, GitHub is broken.” Check plan/visibility/deployment, permission, and organization policy separately.

15. Mini lab: build a platform-state inventory without changing anything

Choose any public GitHub repository you are allowed to inspect. For a zero-risk example, use mohammadijoo/DevOps_Academy. Record the following in a local text file:

  1. Repository coordinate (OWNER/REPO).
  2. Visibility.
  3. Default branch.
  4. Whether the owner is a user or organization.
  5. Your viewer permission if authenticated.
  6. Which visible surfaces appear in the web UI.
  7. One fact that is Git state and one fact that exists only on GitHub.

Then compare the UI result with gh repo view --json ... or the REST GET response. Do not change settings. The purpose is to establish that the same hosted resource can be observed through several interfaces.

16. Verification checklist

  • You can explain Git versus GitHub without saying one is a synonym for the other.
  • You can distinguish user, organization, and enterprise accounts.
  • You can explain personal versus organization repository ownership.
  • You can separate visibility from authorization.
  • You can identify internal visibility as an Enterprise Cloud/enterprise-account capability rather than a generic private mode.
  • You can tell GitHub.com/Enterprise Cloud from self-hosted GHES and know to select the correct documentation version.
  • You used only read-only commands in the mini lab.

Knowledge check

A public repository is readable by everyone. Does that mean everyone can push to its default branch?

Where does a pull-request review decision live: in the Git commit object or in GitHub-hosted state?

Why is an organization not a shared team login?

You cannot see a repository setting. Name three hypotheses to test.

What is the first question to ask when reading GitHub documentation for an employer-managed server?

17. Summary

Git provides distributed version-control mechanics. GitHub hosts Git repositories and adds identities, organizations, enterprise policy, repository permissions, collaboration resources, automation, security, APIs, and governance. Repository ownership, visibility, role, plan, deployment, and Git state are separate dimensions. Keeping them separate is the foundation for every later GitHub operation.

Next lesson

Move from the model to a disposable repository workflow

Lesson 02 will create a free-compatible lab repository, inspect it through the web UI, GitHub CLI, REST API, and local Git, then prove which changes affect hosted refs versus GitHub-only resources.

Authoritative references

 Types of GitHub accounts
 Access permissions on GitHub
 About repositories
 About versions of GitHub Docs
 GitHub CLI manual
 GitHub REST API versions
 Repository roles for an organization
 About GitHub Enterprise Cloud
 About GitHub Enterprise Server
 gh repo view
 Rate limits for the REST API

Keep the academy open

Support free, practical DevOps education.

Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0 Send only Ethereum/ERC-20 compatible assets to this address.