Preparing to Connect the Code Repository with SAP Commerce Cloud

Objective

After completing this lesson, you will be able to explain the essential steps required to connect Code Repository with SAP Commerce Cloud.

Code Repository Connection – Overview

The first step in deploying an SAP Commerce Cloud site to the public cloud is to establishing a connection to the code repository.

SAP Commerce Cloud supports three types of public Git-based code repositories:

  • GitHub
  • GitLab
  • Bitbucket

You can select the Repository link to navigate to the Repository Configuration page.

This image shows the the Repository link in the Cloud Portal, leading to the Repository Configuration page.

On the Repository Configuration page, you can configure the connection using either the SSH or HTTPS protocol. SAP Commerce Cloud retrieves the code from your repository using the selected protocol:

SSH
SAP Commerce Cloud automatically generates a public key. Copy this key and paste it into your code repository — typically found under the SSH and GPG keys tab on the Settings page. You will see a demonstration of this process shortly.
HTTPS
Create a personal access token from your code repository — typically found under the Personal Access Tokens tab on the Developer settings page. Copy and paste the token into the Repository Configuration page.

The repository configuration applies to all three environments — Development, Staging and Production — within the Cloud Portal. If you use different repositories across environments, note that SAP Commerce Cloud does not support separate configurations for each environment.

Note

You can also use a custom private code repository and set up a VPN or NAT connection between your private network and SAP Commerce Cloud. For more information, refer to the External Code Repositories section.

Code Repository Connection - Demo

Let’s view a demonstration of the connection setup process.

This concludes the overview of configuring the repository connection between a Git-based repository and SAP Commerce Cloud. In the upcoming lessons, we will cover setting up the repository structure and initiating a code build from the repository to SAP Commerce Cloud.

Key Takeaways

  • To connect SAP Commerce Cloud to a Git-based repository (GitHub, GitLab, or Bitbucket), configure the connection in the Cloud Portal using SSH — which requires adding an auto-generated public key to your repository — or HTTPS, which requires a personal access token from your repository's developer settings.
  • The repository configuration is shared across all three environments (Development, Staging, and Production); SAP Commerce Cloud does not support separate repository configurations for individual environments.