Magento Commerce Cloud – How to Set Up in Localhost

magento2magento2-cloud

I'm trying to set up Magento commerce cloud in localhost, I have followed this link

my last command was git pull origin environment-ID,
now I show on the local folder structure, that there is no .env file or not a var folder also,
and one of my colleagues has a facing issue on API,

"message": "Internal Error. Details are available in the Magento log file. Report ID: webapi-6298be27bf288"

so I have run command : magento-cloud mount:download but its gives error below,

Enter a number to choose a mount to download from:
  [0] app/etc
  [1] pub/static
  [2] var
  [3] pub/media
  [4] All mounts
 > 4

Target directory [.]: .

Downloading files from all remote mounts to .

Are you sure you want to continue? [Y/n] Y

Downloading files from app/etc to app/etc

Hello rushikesh-solanki (UUID: caba4943-7d8b-4ed1-98ed-2680aa1e9ba6), you successfully authenticated, but could not connect to service mg5w26ssdfxhgcjw-integration-5osdjmyuq--mymagento (reason: service doesn't exist or you do not have access to it)
  Hello rushikesh-solanki (UUID: caba49s43-7d8db-4eds1-98efd-2680aas1e9ba6), you successfully authenticated, but could not connect to service mg5w26sdfxhgcjw-integration-5ojmsdyuq--mymagento (reason: service doesn't exist or you do not have access to it)
  Connection closed by 52.65.39.201 port 22
  rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
  rsync error: unexplained error (code 255) at io.c(235) [Receiver=3.1.2]

                                                                                                                                              
  [ProcessFailedException]                                                                                                                    
  The command failed with the exit code: 255                                                                                                  
                                                                                                                                              
  Full command: 'rsync' '--archive' '--compress' '--human-readable' '-v' 'mg5w2sd6fxhgcjw-integration-5osdjmyuq--mymagento@ssh.ap-3.magento.cloud:app/etc/' './app etc'

I have run command : magento-cloud db:dump but its gives error below

[ProcessFailedException]                                                                                                                    
  The command failed with the exit code: 255                                                                                                  
                                                                                                                                              
  Full command: ssh '-o' 'SendEnv TERM' '-o' 'CertificateFile /home/magento/.magento-cloud/.session/sess-cli-default/ssh/id_ed25519-cert.pub  
  ' '-o' 'IdentityFile /home/magento/.magento-cloud/.session/sess-cli-default/ssh/id_ed25519' '-o' 'IdentityFile /home/magento/.ssh/id_rsa'   
  '-o' 'IdentityFile /home/magento/.ssh/id_ed25519' 'mg5w2sd6fxhgcjw-integration-5ojmydsuq--mynmagento@ssh.ap-3.magento.cloud' 'echo "$MAGENTO_CL  
  OUD_RELATIONSHIPS"

please help me with this or give me suggestions on what should I need to do about this.
thanks in advanced.

Best Answer

You can just clone the project using git, you'll find the concrete command in your Cloud project page

enter image description here

Note that you will need to setup your public keys in your account https://accounts.magento.cloud/user/XXXX/edit under SSH Keys section

After that, just run composer install & download app/etc/env.php from Cloud server, replacing services info for the ones you'll use in your local environment

This should be enough to make it work locally

Related Topic