Set Up GitHub as Your Source Control

Configure your GitHub repository to store project files and manage team access.

Required Editions

Available in: Lightning Experience in Professional (API access required), Enterprise, Performance, Unlimited, and Developer Editions
Not available in: Government Cloud Plus. Contact your Salesforce account executive for more details.
Not available in: EU Operating Zone. EU Operating zone is a special paid offering that provides an enhanced level of data residency commitment. Lifecycle Center is supported in orgs in the EU that aren’t part of EU OZ, per standard product terms and conditions.
User Permissions Needed
To set up a source control: Lifecycle Center Admin

Structure the repository as a Salesforce DX project. You can identify a Salesforce DX project by the sfdx-project.json file in the root directory. Create the required repository in these ways:

  • Lifecycle Center automatically creates the repository when you create a pipeline.
  • Use an existing repository or create one manually from the dx-empty template. 

As a best practice, configure branch protection rules for branches like main, staging, and integration to prevent the source control from deleting them after a merge. For existing repositories, verify that protection rules are active and make sure that they prevent the deletion of stage branches after a change request merge.

Each Lifecycle Center pipeline requires its own GitHub repository to act as the single source of truth. Lifecycle Center uses the GitHub REST API and OAuth 2.0 to ensure secure communication.

Add a Team Member to the Project Repository

If you’re a team manager or Salesforce admin, complete these steps:

  1. Ask each team member to create a GitHub account (if they don’t have one) and to send you their GitHub username.
  2. Log in to GitHub and update the project repository settings for access to invite the team member as a collaborator.
  3. Confirm that the team member received the email invitation from GitHub and accepted it.

Join a Project Repository as a Collaborator

If you’re a team member, complete these steps:

  1. Create a GitHub account if you don’t have one.
  2. Send your GitHub username to the team manager or Salesforce admin who’s setting up Lifecycle Center.
  3. Check your email for an invitation to collaborate on the repository, and then accept it. 
    If you haven’t received an email invitation, contact the person who set up Lifecycle Center.

Grant Access to Organization-Owned GitHub Repositories

Request access to GitHub repositories owned by an organization to make them available for your Lifecycle Center pipelines. GitHub repositories owned by an organization aren’t visible in Lifecycle Center until an organization account owner grants access. If you don't see your organization's repositories when setting up a pipeline, you must request access through your personal GitHub.

Note
Note When you authorize GitHub from Lifecycle Center, you'll see a request from the Salesforce DX connected app, owned by the ALM DX Salesforce Bot Account, a Salesforce-owned service account. Authorizing this app is required for Lifecycle Center to interact with GitHub on your behalf, including fetching repositories, creating branches, and syncing changes. The app requests access to all repositories because Lifecycle Center needs to retrieve the full list of repositories available to your GitHub account when setting up a pipeline.
  1. Log in to your personal GitHub account, and go to Settings.
  2. Click Applications, then select Authorized OAuth Apps.
  3. Click Salesforce DX.
  4. Find the organization that owns the repository, then click Request.
  5. Repeat the steps for other Salesforce integration applications.
     The GitHub repository owner receives a notification to approve your request.

After the GitHub repository owner approves the request, go to Lifecycle Center, and start creating your project.