Hosting the Self-Managed Commerce Source Code
To develop Self-Managed Commerce functionality, you will need to clone and re-host the Self-Managed Commerce source code. Before you begin, ensure that you have the following items:
- Access to your own Git based SCM (Source Code Management) hosting service.
- GitLab specific credentials on
code.elasticpath.com.
Obtaining Access To Elastic Path Resources
For information about accessing and locating licensed source code and artifacts, see Code and Artifacts.
Setting up an SSH Key
Set up an SSH key for use with the Git repository. For instructions, see Generate an SSH key pair and Add an SSH key to your GitLab account.
Cloning the Git Repository
Navigate to
https://code.elasticpath.com/ep-commerce/ep-commerceand clone the Git repository.git clone https://code.elasticpath.com/ep-commerce/ep-commerce
Windows File Path Limitation
Do not clone to a directory with a file path greater than 20 characters. Windows file paths are limited to 260 characters. The longest file path in the source code is greater than 230 characters.
tip
Configure Git to convert line ending to LF on input. The command to configure this is:
git config --global core.autocrlf input
Checking out a Release Branch
Each branch contains the source code for the release and all subsequent patches.
- Check out the correct branch of a release version of Self-Managed Commerce.
git checkout -b release/<major>.<minor>.x
Where:
majorindicates a major release versionminorindicates a minor release versionxindicates patch updates
tip
Enable Watch for the repository to be notified of any updates.
Pushing to Your Repository
Create a development branch in your local repository from the released version branch that you checked out.
The branch name depends on the SCM and your branch naming conventions. For example:
git checkout -b <my-org-ep-release-dev>Add the Self-Managed Commerce repository to your own Git hosting service.
git remote add <remote-name> <my-git-repo-url>Push the development branch to your own Git hosting service.
git push <remote-name> <my-org-ep-release-dev>