This is a new service – your feedback will help us to improve it.

  1. Home
  2. GitHub User Guide
  3. Setting up GitHub
Getting Started

Setting up GitHub

This guide explains how to get set up with GitHub at the Ministry of Justice (MOJ). It covers account creation, joining the MOJ organisation, and the core setup steps needed before you can start contributing to repositories.


Creating a GitHub account

You'll need your own personal GitHub account. Follow GitHub's documentation if you don't already have one, or sign up directly.

If you already have a GitHub account from before joining MOJ, you can choose to use it here or create a new one. Some people prefer continuity with their previous work; others prefer to keep things separate.

Your GitHub account is personal to you, not something MOJ sets up or manages on your behalf. If you ever lose access, recovery is on you, so it's worth getting the basics right from day one:

  • set up an authenticator app for two-factor authentication (2FA), and store your recovery codes somewhere safe
  • use a personal recovery email address, kept separate from your work email

Joining the MOJ GitHub organisation

If you have a @digital.justice.gov.uk or @justice.gov.uk email address, you can use Single Sign-On (SSO) to join the organisation:

If you don't yet have a GitHub account, you'll be prompted to create one at the end of the SSO process. Add your work email as your primary email address in GitHub once you're set up.

Once you join, you're automatically added to the all-org-members team (Ministry of Justice) or everyone team (MOJ Analytical Services). This gives you access to a number of shared MOJ tools and platforms.


Getting repository access

Organisation membership alone does not give you access to individual repositories. Repository-level access is managed by each delivery team, either directly or via a GitHub team.

To request access to a specific repository:

  1. check the repository's README or CODEOWNERS file for the responsible team
  2. contact the team's Maintainer or Admin directly If you're unsure who owns a repository, ask in #ask-developer-experience

Some teams manage onboarding access through a dedicated repository (for example, team-specific -access repos). Check your team's onboarding documentation or your lead for the exact process.


Install the GitHub CLI and authenticate:

gh auth login --git-protocol ssh --hostname github.com --web

Follow the prompts to complete authentication.


Setting up SSH

We recommend setting up Secure Shell (SSH) for cloning and signing commits.

We require Git commit signing for all repositories.


Using GitHub Apps for automation

If your team needs to authenticate GitHub Actions workflows (for example, for CI/CD or Terraform), MOJ recommends using a GitHub App rather than a personal access token. Contact #ask-developer-experience for guidance.


Development workflow

MOJ teams generally follow GitHub flow, a branch-based development workflow. See GitHub's documentation on GitHub flow for more detail.

General conventions:

  • create feature branches from main, not from other feature branches
  • open pull requests in draft mode for early feedback if useful
  • convert to ready for review once checks pass and feedback is addressed
  • write a clear, concise PR description with relevant context
  • check the repository's own contributing guidelines, as these may vary by team

Third-party suppliers

If you're a third-party supplier maintaining code on behalf of the MOJ, you'll need to be added as an outside collaborator. Being an outside collaborator is for third party suppliers who are maintaining code on behalf of the MOJ.

Outside collaborators can only access specific repositories and are limited in what they can do within the MOJ organisation. They are not able to access private repositories outside of the ones they've been assigned to.

Users do not require an MOJ email address to be added as an outside collaborator.

Repository Admins can add collaborators directly to their repositories. It is the repository Admin's responsibility to remove collaborators when access is no longer required.


Getting help


Additional resources

Last reviewed: 28 July 2026Review status: ✓ Up to dateOwner: Developer Experience team

Was this page useful?