Chapter 01Lesson 04~130 minutes

GitLab Platform Foundations: GitLab.com, Self-Managed, Dedicated, Tiers, and Architecture: Diagnostics, Failure Modes, Security, and Performance

Diagnose GitLab platform failures by preserving evidence, identifying the exact offering/namespace/project/ref scope, distinguishing permission from tier/version/context problems, and making the least destructive correction.

DiagnosticsFailure analysisPermissionsglab contextSafe recovery

Learning objectives

  • Apply a preserve-evidence → classify-scope → inspect → correct → verify diagnostic sequence.
  • Distinguish local Git problems from GitLab project metadata, access, offering/tier/version, and CLI host-context failures.
  • Recognize over-privileged role assignment as a security defect rather than a convenient fix.
  • Interpret representative REST and glab failures without exposing credentials or destroying project state.
  • Use reversible local failures and read-only hosted evidence to practice recovery safely.

1. The diagnostic sequence

When GitLab appears inconsistent, resist the urge to click until something works. Use a fixed sequence:

  1. Preserve evidence. Capture the exact URL/host, project path, branch/ref, command, status code, timestamp, and relevant non-sensitive output.
  2. Identify scope. Offering → instance/host → namespace → project → ref/MR/pipeline/job/runner/artifact/registry/environment/policy.
  3. Inspect permissions and product availability. Is the feature absent because of role, tier, offering, administrator policy, version, or feature status?
  4. Inspect the correct state surface. Git for local/ref state; project/API for hosted metadata; CI/runner surfaces for execution; admin docs for platform lifecycle.
  5. Choose the least destructive correction. Prefer correcting context, permissions, configuration, or a local remote before deletion, force-push, transfer, or bypass.
  6. Verify independently. Re-run the original failing observation plus one separate evidence source.

2. Symptom-to-layer matrix

Symptom Likely layers First evidence
Local commit not visible in GitLab Git remote/ref/transport git status -sb, git remote -v, git log, push result.
Setting/menu missing Role, tier, offering, version, admin policy, feature status Exact feature docs + current role + project/namespace context.
glab repo view shows wrong project CLI context / Git remote git remote -v, glab auth status --hostname ....
REST returns 404 for known project Bad project ID/path encoding, wrong host, project private/inaccessible, renamed/transferred project Exact URL, encoded path, browser path, auth context if applicable.
User cannot push Authentication, role, branch protection, project policy Transport error + role + target branch protection; do not grant Owner blindly.
Pipeline exists but job waits Runner availability/tags/policy/executor Job state and runner assignment—not Git history alone.

3. Intentionally broken example — wrong REST path

Suppose the project exists at https://gitlab.com/YOUR_NAMESPACE/platform-foundations-lab. This request is structurally wrong because the namespaced project path is not encoded as a single project identifier:

# Broken for the path-parameter form:
curl -i "https://gitlab.com/api/v4/projects/YOUR_NAMESPACE/platform-foundations-lab"

Depending on routing and project state, you should expect a not-found-style failure rather than useful project JSON. Preserve the status line and URL. Do not “fix” it by creating a token or changing project visibility.

# Correct: encode the slash inside the project identifier.
curl -i \
  "https://gitlab.com/api/v4/projects/YOUR_NAMESPACE%2Fplatform-foundations-lab"

If the project is public and the path is correct, the corrected request should return 200 OK plus project metadata. If it remains 404, next check exact project path/rename/transfer and visibility before assuming an outage.

4. Intentionally broken example — local clone points somewhere else

A browser tab can show the correct project while your terminal is in a clone whose origin points to an old fork or a different namespace. This produces perfectly valid Git behavior against the wrong target.

git remote -v
git branch --show-current
git rev-parse HEAD

If origin is wrong, correct only the local remote after verifying the intended clone URL:

# Reversible local configuration change; substitute your verified URL.
git remote set-url origin \
  https://gitlab.com/YOUR_NAMESPACE/platform-foundations-lab.git

git remote -v
git fetch origin

This is safer than deleting the project, force-pushing, or changing hosted settings because the defect was local context.

5. glab context can be correct and still point at the wrong host

glab auth status determines an instance from Git remotes, GITLAB_HOST, or configuration. Engineers who work with both GitLab.com and Self-Managed hosts should be explicit during diagnosis:

git remote -v
glab auth status --hostname gitlab.com

# If you are diagnosing a Self-Managed host, use its exact hostname instead.
glab auth status --hostname gitlab.example.invalid
Never add --show-token to diagnostic screenshots or logs. Authentication status is evidence; the token value is a credential. Chapter 02 covers safe credential handling.

6. “Missing feature” has five different causes

When a feature does not appear, classify before changing roles:

  1. Tier: the feature is not included for this namespace/instance subscription.
  2. Offering: the control exists only on GitLab.com, Dedicated, or Self-Managed—or is administered differently.
  3. Version: your Self-Managed instance predates, renames, or deprecates the feature.
  4. Permission/policy: your role is insufficient or an administrator/group policy disables access.
  5. UI movement/feature status: the control moved, is behind a current product status boundary, or its name changed.

The least safe response is “make me Owner.” The safe response is to identify the minimum permission required for the exact operation after confirming the feature exists in that deployment.

7. Over-permission is a failure mode

GitLab roles are cumulative authorization bundles. Maintainer and Owner are high-impact roles. Granting them to solve an ordinary write or triage problem can expand access to settings, membership, protected resources, CI/CD configuration, or project/group lifecycle operations beyond what the task requires.

Keep authentication and authorization separate: a user may be successfully signed in but lack project access; a valid token can be denied by scope or project membership; a user can hold a role in one group and none in another. Diagnose the resource and required permission instead of treating “login worked” as proof of authorization.

8. Security-sensitive and destructive actions

Do not use these as troubleshooting shortcuts: project/group deletion or transfer, visibility changes on valuable data, protected-ref relaxation, force-push, approval/policy bypass, token/key creation, secret/variable exposure, runner registration on a persistent host, registry/package deletion, production environment deployment, Self-Managed restore/upgrade, or history rewrite.

If a future incident requires one of these, record preflight state, exact scope, required role/tier/offering/version, rollback/recovery path, and post-change verification. Chapter 01 uses only reversible local changes and disposable resources.

9. Performance and billing only when causal

A slow page is not automatically a “GitLab performance” problem; it may be network latency, a large repository, object storage, runner queueing, CI image pulls, or a Self-Managed service dependency. Likewise, a pipeline not running can be quota/compute-related, but you should establish that from current usage/job evidence instead of guessing from plan names.

Do not weaken tests, security checks, or isolation simply to reduce cost. Measure the bottleneck and preserve the trust model.

10. Diagnostic lab — two safe failures

  1. API path failure: run the unencoded public project request, record the status, then correct the encoded path and verify path_with_namespace.
  2. Local context failure: in a temporary copy of your clone, set origin to https://gitlab.com/example-does-not-exist/platform-foundations-lab.git, run git remote -v, then restore the correct URL before any push. Do not enter credentials for the fake target.

Verification checklist: you can name the broken layer before fixing it; no hosted project setting changed; no token was created or displayed; the corrected API returns the intended project; the restored origin matches the intended namespace/project.

Knowledge check

A setting is missing. What should you check before asking for Owner?

The browser shows project A, but git push updates project B. What layer is probably wrong?

A public Projects API request returns 404. Does that prove GitLab is down?

Why preserve the original error before correcting it?

Summary

GitLab troubleshooting is a scope-classification problem. Preserve evidence, identify the exact offering/host/namespace/project/ref or execution object, distinguish permission from product availability, correct the smallest layer, and verify independently. Security-sensitive operations are not diagnostic shortcuts.

Next lesson

Integrate the model in a checkpoint

Lesson 5 combines project creation, Git/ref verification, API/glab inspection, trust-boundary mapping, predictions, and cleanup into a single reproducible platform-foundations lab.

Official references

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
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this address.