Pull code from a private Git repository
Your Magento Enterprise Cloud Edition project can include code located in a private Git repository (for example, a module or theme). To do so, you must add your project’s public SSH key to your private Git repository and update your project’s
To add a deployment key to your private GitHub repository, you must be the administrator of that repository.
GitHub allows you to use a deploy key for one repository only.
If your project needs to access multiple repositories, you can choose to attach an SSH key to an automated user account. Because this account won’t be used by a human, it’s referred to as a machine user. You can then add the machine account as collaborator or add the machine user to a team with access to the repositories it needs to manipulate.
Find your deploy key
To find your project SSH public key (also referred to as a deploy key):
- Log in to your project using the Web Interface.
- Click Configure Project.
Click Deploy Key.
The following figure shows an example.
- Copy the deploy key to the clipboard.
- See Enter your GitHub deploy key.
Enter your GitHub deploy key
By default, on github, deploy keys are read-only, so you do not need to worry about anything from your Magento project pushing code to the private repository.
To enter your project’s public key as a GitHub deploy key:
- Log in to your GitHub repository as its administrator.
Click Settings as the following figure shows.
If you don't see this option, you're not the repository administrator and you cannot complete this task. Ask your GitHub project administrator to do this.
On the Settings page, in the left navigation bar, click Deploy Keys as the following figure shows.
- Click Add deploy key.
- Follow the prompts on your screen to complete the task.
composer.json, use the
ssh://<user>@<host>:<port>/<path>.git if using a non-standard port.</p>