Completely new to Adobe Commerce? No problem! The following guide will help you set-up your computer to work with Adobe Commerce Cloud by downloading and setting up all the needed technologies.
*Note this is from a Windows 10 perspective, when referencing the CLI (Gitbash) technology, Apple users can simply open a terminal.
**Always be sure to check the software compatibility/requirements to make sure you download the right versions!
https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html
Git/GitBash Setup
Git : https://git-scm.com/downloads
I use all the default settings for the git download (also includes Gitbash in the default options).
To verify that Git/Gitbash is setup, right click anywhere on your desktop to see if it is popped up as an option.
PHP Setup
PHP8.1: https://windows.php.net/download#php-8.1
Download the ZIP file, either TS or NTS, (there should be no difference in this use case).
Extract the zip to a file(name this file php8.1, or something similar).
After Extracting PHP, make sure to include it to your system path so you can access PHP globally. To do so, search for “Path” in your windows search bar, and click on “edit the system environment variables”. Then click on “Environment Variables”.
Click on the “Path” under System Variables (not user variables!) and click the “Edit” button.
Hit “New” then “Browse” and locate your newly unzipped PHP file.
Make sure to click “OK” as you exit out of the windows to save your changes, if you hit “Cancel” or exit out, the path will not save!
You can double check if you did this right by opening up a terminal outside of your PHP document, and running the command “php -v”, if done correctly the version of PHP should pop-up.
Composer Setup
Composer: https://getcomposer.org/download/
Download the .exe and run it, go through the default settings (It should pick up your newly downloaded and extracted PHP folder!), verify it installed correctly by opening a new terminal and typing in “composer -v”
Adobe Commerce CLI Tool
The next thing we will want to install is the Adobe Commerce Cloud CLI tool.
You can also find the Adobe Commerce CLI tool documentation via: https://devdocs.magento.com/cloud/reference/cli-ref-topic.html
This is a little tricky as Git bash does not like the pipe command, So in order to execute the following command:
“curl -sS https://accounts.magento.cloud/cli/installer | php”, we need to run a different git bash executable.
Navigate to the following (this is where git was downloaded), “C:\Program Files\Git\bin”, and run the “Bash” executable in the folder. In this terminal, you should be able to run the pipe command , and install the cloud CLI tool.
After that, run the following command to add it into your path, “export PATH=$PATH:$HOME/.magento-cloud/bin”.
Reload your terminal, and check if magento-cloud is working by using the command “magento-cloud”
Now we’re all set with the basic technologies to work with Adobe Commerce Cloud!
SSH Key Setup:
Next we will set-up the public/private key combo to access our environment.
Navigate to https://accounts.magento.cloud/user ,and go to “account settings”. Under the SSH Keys is where we will be working. Click on “Add public key”.
Back in your terminal, we will create your key pairs to add to the public key section. In your terminal, run the following command “ssh-keygen -o”. Setup your file location and a password if you want. Your private key will be located as a file named id_rsa, and your public key will be id_rsa.pub . We’re interested in the rsa.pub contents. Copy that file and paste it in the “Add public key” section in your browser. Give your key a title and Save it.
We should now be able to clone the project to our local environment!
Make sure you can also login to your magento-cloud CLI, by running the following command in the terminal “magento-cloud login”. Follow the steps to get logged in via CLI.
Next steps
The following guide will help you pull down a project to make any necessary changes when trying to downgrade/upgrade your Adobe Commerce instance:
https://adobeexchangeec.zendesk.com/hc/en-us/articles/5668983550605