Skip to main content

Set Up GitHub and Connect to CumulusCI

Learning Objectives

  • Set up your GitHub Account.
  • Connect CumulusCI to your GitHub Account.
Note

If you already have CumulusCI installed, type the cci version command to make sure you’re using the latest version before continuing with this unit. If you’re told there is a newer version, run the command noted in the version information outlined in the Terminal.

Progress Recap

Tasha and her team now have a Dev Hub for creating Salesforce scratch orgs and their Dev Hub is set up and connected to the tools and automation they’ll need to quickly get the temporary scratch orgs ready for their work. (And, if you’ve been following along, you do as well!) Now it’s time to set up a way to save all of their hard work to a central space called a version control system. Each member of her team will also connect to this central space so each person is able to get the customizations made by other team members, test them, and give feedback.

There are many version control systems available, and in this scenario, Tasha and her team will use GitHub. Stay with us and we’ll walk you through how to set up a GitHub user account, create an automatic connection between GitHub and CumulusCI, and install a desktop version of GitHub for sending and receiving customizations stored in GitHub.

Set Up Your GitHub Account

Note

If you already have a GitHub account, skip this step and instead go to Create a Personal Access Token.

  1. Join GitHub by clicking here.
  2. Follow these steps to complete the process:
    1. Sign up and create your account.
    2. Choose the free individual plan.
    3. Answer the questions on screen and complete the setup.

Create a Personal Access Token

You’ll use a personal access token to authenticate to GitHub within CumulusCI. This helps keep your user password safe.

  1. Within GitHub, verify your email address, if it hasn't been verified yet.
  2. In the upper-right corner of any page, click your profile photo, then click Settings.
  3. In the left Side Bar, click Developer settings.
  4. In the left Side Bar, click Personal access tokens.
  5. Click Generate new token.
  6. Give your token a descriptive name such as CumulusCI.
  7. Under Select Scopes, choose repo. This will allow you to use your token to access your repositories from your command line. You can add other scopes if you want.
  8. Click Generate token.
  9. Either click Clipboard icon to copy the token to your clipboard or copy it manually, and then paste it to a secure location. Don't skip this step—you won't be able to see your token again!

Connect CumulusCI To Your GitHub Account

CumulusCI needs your GitHub account credentials to access automation in GitHub. To store the credentials in CumulusCI's keychain as a service:

  1. Make sure you're logged into your GitHub account.
  2. Type this command in the VS Code Terminal: cci service connect github github.com
  3. When prompted, enter your GitHub username.
  4. When prompted in the VS Code Terminal, enter the email address you use with your GitHub account.
  5. When prompted in the browser, enter the one-time code from the VS Code Terminal and click Continue.
  6. Click Authorize SFDO-Tooling.
  7. CumulusCI will check the credentials you entered to make sure they work. If everything is working, you’ll see a confirmation message in the VS Code Terminal.

Install GitHub Desktop

  1. Go to the GitHub Desktop website.
  2. Download the appropriate Mac or Windows version.
  3. Install the application.
  4. Open GitHub Desktop app.
  5. Sign into your GitHub.com account.
  6. Complete any additional setup steps requested by GitHub Desktop.
  7. Click Finish.

Great job! You're ready to use CumulusCI!

Now it’s time to put this setup to work. After you complete the quiz below, continue along the Build Applications with CumulusCI trail with Tasha and her team as they further develop their community project.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback